Browse Source

fix: disable renamed file alert temporally

Tienson Qin 4 years ago
parent
commit
86d3297d4a
1 changed files with 7 additions and 6 deletions
  1. 7 6
      src/main/frontend/fs/node.cljs

+ 7 - 6
src/main/frontend/fs/node.cljs

@@ -41,16 +41,17 @@
             db-mtime (db/get-file-last-modified-at repo path)
             disk-content (-> (protocol/read-file this dir path nil)
                              (p/catch (fn [error] nil)))
+            disk-content (or disk-content "")
             ext (string/lower-case (util/get-file-ext path))
             file-page (db/get-file-page-id path)
             page-empty? (and file-page (db/page-empty? repo file-page))]
       (cond
-        (and (not page-empty?) (nil? disk-content))
-        (notification/show!
-         (str "The file has been renamed or deleted on your local disk! File path: " path
-              ", please save your changes and click the refresh button to reload it.")
-         :error
-         false)
+        ;; (and (not page-empty?) (nil? disk-content) )
+        ;; (notification/show!
+        ;;  (str "The file has been renamed or deleted on your local disk! File path: " path
+        ;;       ", please save your changes and click the refresh button to reload it.")
+        ;;  :error
+        ;;  false)
 
         (and
          (not= disk-mtime db-mtime)