TagSpaces is an offline, open source, document manager with tagging support
removing fileExist check
uggrockb3009285b02b
diff --git a/data/js/core.api.js b/data/js/core.api.jsindex 4e54406db..c005b4f9d 100644--- a/data/js/core.api.js+++ b/data/js/core.api.js@@ -147,7 +147,7 @@ define(function(require, exports, module) {$("#loadingAnimation").css('visibility', "hidden");}- function fileExists(fileName) {+/* function fileExists(fileName) {console.log("Check if filename: "+fileName+" already exists.");for (var i=0; i < fileList.length; i++) {if(fileList[i].name == fileName) {@@ -155,7 +155,10 @@ define(function(require, exports, module) {}}return false;- }+ } */+++/* UI and Layout functionalities */function reloadUI() {location.reload();@@ -330,7 +333,7 @@ define(function(require, exports, module) {exports.updateLogger = updateLogger;exports.showLoadingAnimation = showLoadingAnimation;exports.hideLoadingAnimation = hideLoadingAnimation;- exports.fileExists = fileExists;+// exports.fileExists = fileExists;exports.reloadUI = reloadUI;exports.openFileViewer = openFileViewer;exports.closeFileViewer = closeFileViewer;diff --git a/data/js/core.ui.js b/data/js/core.ui.jsindex ada8ce16a..9b6570c87 100644--- a/data/js/core.ui.js+++ b/data/js/core.ui.js@@ -133,10 +133,10 @@ define(function(require, exports, module) {var bValid = true;// bValid = bValid && checkLength( newFileName, "filename", 4, 200 );- if(TSCORE.fileExists($( "#newFileName" ).val())) {+/* if(TSCORE.fileExists($( "#newFileName" ).val())) {updateTips("File already exists.");bValid = false;- }+ } */if ( bValid ) {TSCORE.IO.saveTextFile(TSCORE.currentPath+TSCORE.TagUtils.DIR_SEPARATOR+$( "#newFileName" ).val(),fileContent);TSCORE.IO.listDirectory(TSCORE.currentPath);