mirror of
https://github.com/logseq/logseq.git
synced 2026-05-05 19:36:35 +00:00
feat: import SQLite db to create a new graph
This commit is contained in:
@@ -147,12 +147,14 @@
|
||||
On iOS, repo-url might be nil"
|
||||
[repo-url]
|
||||
(when (not-empty repo-url)
|
||||
(let [path (config/get-local-dir repo-url)
|
||||
path (if (path/is-file-url? path)
|
||||
(path/url-to-path path)
|
||||
path)
|
||||
parts (->> (string/split path #"/")
|
||||
(take-last 2))]
|
||||
(if (not= (first parts) "0")
|
||||
(util/string-join-path parts)
|
||||
(last parts)))))
|
||||
(if (config/db-based-graph? repo-url)
|
||||
(string/replace-first repo-url config/db-version-prefix "")
|
||||
(let [path (config/get-local-dir repo-url)
|
||||
path (if (path/is-file-url? path)
|
||||
(path/url-to-path path)
|
||||
path)
|
||||
parts (->> (string/split path #"/")
|
||||
(take-last 2))]
|
||||
(if (not= (first parts) "0")
|
||||
(util/string-join-path parts)
|
||||
(last parts))))))
|
||||
|
||||
Reference in New Issue
Block a user