Skip to content

TagSpaces is an offline, open source, document manager with tagging support

handling the case .txt by extacting of the filename without extension

Ilian20d5585c94cd
diff --git a/data/js/tagutils.js b/data/js/tagutils.js
index 8a0d810d0..0631f6e8b 100644
--- a/data/js/tagutils.js
+++ b/data/js/tagutils.js
@@ -25,6 +25,8 @@ define(function(require, exports, module) {
var indexOfDot = fileName.lastIndexOf(".");
if(indexOfDot > 0) {
return fileName.substring(0, indexOfDot);
+ } else if(indexOfDot == 0) { // case filename: .txt
+ return "";
} else {
return fileName;
}