fix(fs): disable graph name warning

See-also: #10246
pull/10266/head
Andelf 2023-09-20 21:41:22 +08:00
parent 7c15eb7ffc
commit 0831f312d9
1 changed files with 3 additions and 12 deletions

View File

@ -20,8 +20,7 @@
[goog.object :as gobj] [goog.object :as gobj]
[lambdaisland.glogi :as log] [lambdaisland.glogi :as log]
[logseq.graph-parser.util :as gp-util] [logseq.graph-parser.util :as gp-util]
[promesa.core :as p] [promesa.core :as p]))
[logseq.common.path :as path]))
(defn remove-ignore-files (defn remove-ignore-files
[files dir-name nfs?] [files dir-name nfs?]
@ -90,18 +89,10 @@
(defn- precheck-graph-dir (defn- precheck-graph-dir
"Check graph dir, notify user if: "Check graph dir, notify user if:
- Grame dir name is `logseq`, the same as app, which might cause confusion
- Graph dir contains a nested graph, which should be avoided - Graph dir contains a nested graph, which should be avoided
- Over 10000 files found in graph dir, which might cause performance issues" - Over 10000 files found in graph dir, which might cause performance issues"
[dir files] [_dir files]
(when (= (string/lower-case (path/basename dir)) ;; disable this check for now
"logseq")
(state/pub-event!
[:notification/show {:content [:div "The folder name "
[:code "logseq"]
" is not suitable for a graph name. Please unlink this graph and choose a different name."]
:status :warning
:clear? false}]))
(when (some #(string/ends-with? (:path %) "/logseq/config.edn") files) (when (some #(string/ends-with? (:path %) "/logseq/config.edn") files)
(state/pub-event! (state/pub-event!
[:notification/show {:content "It seems that you are trying to open a Logseq graph folder with nested graph. Please unlink this graph and choose a correct folder." [:notification/show {:content "It seems that you are trying to open a Logseq graph folder with nested graph. Please unlink this graph and choose a correct folder."