|
|
@@ -80,12 +80,12 @@
|
|
|
[path format] (:rum/args state)
|
|
|
repo-dir (config/get-repo-dir (state/get-current-repo))
|
|
|
[dir path] (cond
|
|
|
- ;; assume local file, relative path
|
|
|
- (not (string/starts-with? path "/"))
|
|
|
- [repo-dir path]
|
|
|
+ (path/absolute? path)
|
|
|
+ [nil path]
|
|
|
|
|
|
- :else ;; global file on native platform
|
|
|
- [nil path])]
|
|
|
+ ;; assume local file, relative path
|
|
|
+ :else
|
|
|
+ [repo-dir path])]
|
|
|
(when (and format (contains? (gp-config/text-formats) format))
|
|
|
(p/let [content (fs/read-file dir path)]
|
|
|
(reset! *content (or content ""))))
|