diff --git a/src/main/frontend/fs/nfs.cljs b/src/main/frontend/fs/nfs.cljs index 3ca796666..d1acf8233 100644 --- a/src/main/frontend/fs/nfs.cljs +++ b/src/main/frontend/fs/nfs.cljs @@ -137,23 +137,26 @@ (p/let [_ (verify-permission repo file-handle true) _ (utils/writeFile file-handle content) file (.getFile file-handle)] - (if (and local-content new? - (or - draw? - ;; Writing not finished - (> pending-writes 0) - ;; not changed by other editors - not-changed? - new-created?)) - (do - (p/let [_ (verify-permission repo file-handle true) - _ (utils/writeFile file-handle content) - file (.getFile file-handle)] - (when file - (nfs-saved-handler repo path file)))) - (do - (js/alert (str "The file has been modified on your local disk! File path: " path - ", please save your changes and click the refresh button to reload it.")))) + (p/let [_ (verify-permission repo file-handle true) + _ (utils/writeFile file-handle content) + file (.getFile file-handle)] + (when file + (nfs-saved-handler repo path file))) + ;; (if (and local-content new? + ;; (or + ;; draw? + ;; ;; Writing not finished + ;; (> pending-writes 0) + ;; ;; not changed by other editors + ;; not-changed? + ;; new-created?)) + ;; (p/let [_ (verify-permission repo file-handle true) + ;; _ (utils/writeFile file-handle content) + ;; file (.getFile file-handle)] + ;; (when file + ;; (nfs-saved-handler repo path file))) + ;; (js/alert (str "The file has been modified on your local disk! File path: " path + ;; ", please save your changes and click the refresh button to reload it."))) )) ;; create file handle (-> diff --git a/src/main/frontend/fs/node.cljs b/src/main/frontend/fs/node.cljs index c619057f4..3edeb62cc 100644 --- a/src/main/frontend/fs/node.cljs +++ b/src/main/frontend/fs/node.cljs @@ -27,7 +27,9 @@ [repo dir path content {:keys [ok-handler error-handler] :as opts} stat] (p/let [disk-mtime (when stat (gobj/get stat "mtime")) db-mtime (db/get-file-last-modified-at repo path)] - (if (not= disk-mtime db-mtime) + (if + false + ;; (not= disk-mtime db-mtime) (js/alert (str "The file has been modified on your local disk! File path: " path ", please save your changes and click the refresh button to reload it.")) (->