Skip to content

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

correcting loading documents on startup

uggrock55dbf3d7a183
diff --git a/data/chromium/chrome.api.js b/data/chromium/chrome.api.js
index 72994ade8..76c689f0b 100644
--- a/data/chromium/chrome.api.js
+++ b/data/chromium/chrome.api.js
@@ -41,8 +41,10 @@ define(function(require, exports, module) {
var filePath = TSCORE.Utils.getURLParameter("open");
filePath = decodeURIComponent(filePath);
if (filePath && (filePath.length > 0)) {
- console.log("Opening file in browser: " + openFile);
- filePath = filePath.split("file://")[1];
+ console.log("Opening file in browser: " + filePath);
+ if(filePath.indexOf("file://") >= 0) {
+ filePath = filePath.split("file://")[1];
+ }
TSCORE.FileOpener.openFileOnStartup(filePath);
}
}