Skip to content

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

fixing #176 selecting the same directory twice fixing double slash in the begin of a path in chrome

uggrock85af679d66ab
diff --git a/data/chromelight/chrome.api.js b/data/chromelight/chrome.api.js
index 475d0cf52..411fc0996 100644
--- a/data/chromelight/chrome.api.js
+++ b/data/chromelight/chrome.api.js
@@ -202,11 +202,15 @@
isDir;
var anotatedDirList = [];
- // sciping the first entry pointing to the parent directory
+ // skiping the first entry pointing to the parent directory
for (var i=1; i < folders.length; i++) {
console.log("Dir "+folders[i]);
name = folders[i].substring(2,folders[i].indexOf('","'));
- path = dirPath+TSCORE.dirSeparator+name;
+ if(dirPath === TSCORE.dirSeparator) {
+ path = dirPath+name;
+ } else {
+ path = dirPath+TSCORE.dirSeparator+name;
+ }
isDir = (folders[i].indexOf(dataDir) > 1);
if(isDir) {
anotatedDirList.push({
diff --git a/data/js/directorybrowser.js b/data/js/directorybrowser.js
index d06833457..81694c647 100644
--- a/data/js/directorybrowser.js
+++ b/data/js/directorybrowser.js
@@ -46,7 +46,7 @@ define(function(require, exports, module) {
subfolders.append($("<button>", {
"class": "btn btn-sm dirButton",
"path": TSCORE.subfoldersDirBrowser[j].path,
- //"title": TSCORE.subfoldersDirBrowser[j].path,
+ "title": TSCORE.subfoldersDirBrowser[j].path,
"style": "margin: 1px;",
"text": " "+TSCORE.subfoldersDirBrowser[j].name
})
diff --git a/data/node-webkit/node-webkit.api.js b/data/node-webkit/node-webkit.api.js
index 8fb086df1..526350896 100644
--- a/data/node-webkit/node-webkit.api.js
+++ b/data/node-webkit/node-webkit.api.js
@@ -498,8 +498,10 @@ define(function(require, exports, module) {
$("body").append('<input style="display:none;" id="folderDialogNodeWebkit" type="file" nwdirectory />');
}
var chooser = $('#folderDialogNodeWebkit');
- chooser.change(function() {
+ chooser.on("change", function() {
TSPOSTIO.selectDirectory($(this).val());
+ $(this).off("change");
+ $(this).val("");
});
chooser.trigger('click');
};