TagSpaces is an offline, open source, document manager with tagging support
Restricting renaming files larger than 5MB in chrome. Fixing a rename bug
uggrock9e8a090b578e
diff --git a/data/js/ioapi.chrome.js b/data/js/ioapi.chrome.jsindex 292628c2a..7e1c81abb 100644--- a/data/js/ioapi.chrome.js+++ b/data/js/ioapi.chrome.js@@ -261,9 +261,18 @@ Still Missing:// currently the file is copied to the new location and than// deleted from the old locationconsole.log("Renaming file: "+filePath+" to "+newFilePath);+ if(filePath == newFilePath) {+ console.error("Initial and target filenames are the same...");+ return;+ }if(nativeIO.fileExists(filePath)) {var blob;var size = nativeIO.getFileSize(filePath);+ // TODO remove the 5MB restriction+ if(size > 5*1024*1024) {+ TSCORE.showAlertDialog("Currently TagSpaces does not support renaming/tagging of files bigger than 5MB!");+ return;+ }if (size){var byteArray = nativeIO.contentsAtPath(filePath);blob = new Int8Array(byteArray);@@ -309,7 +318,7 @@ Still Missing:exports.openDirectory = function(dirPath) {// TODO implement openDirectoryconsole.log("Open directory functionality not implemented on chrome yet!");- TSCORE.showAlertDialog("Select file functionality not implemented on chrome yet!")+ TSCORE.showAlertDialog("Select file functionality not implemented on chrome yet!");}exports.openExtensionsDirectory = function() {