From 09ae42484be72b21b635e48b30f36eff54c43de8 Mon Sep 17 00:00:00 2001 From: jem Date: Fri, 14 Feb 2020 20:07:59 +0100 Subject: [PATCH] fix path nil error --- src/cryogen_core/classpath_able_io/fs.clj | 6 ++---- test/cryogen_core/classpath_able_io/fs_test.clj | 4 ++-- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/src/cryogen_core/classpath_able_io/fs.clj b/src/cryogen_core/classpath_able_io/fs.clj index 63cf90b..734cdb6 100644 --- a/src/cryogen_core/classpath_able_io/fs.clj +++ b/src/cryogen_core/classpath_able_io/fs.clj @@ -30,10 +30,8 @@ (defn path-if-exists [& path-elements] (let [path-from-fs - (apply absolut-path - ;TODO: sollte hier nicht auch stehen: - ;(apply this/virtual-path-from-elements path-elements) - path-elements)] + (absolut-path + (apply this/virtual-path-from-elements path-elements))] (when (Files/exists path-from-fs follow-link-option) path-from-fs))) diff --git a/test/cryogen_core/classpath_able_io/fs_test.clj b/test/cryogen_core/classpath_able_io/fs_test.clj index 72fc070..59a98d0 100644 --- a/test/cryogen_core/classpath_able_io/fs_test.clj +++ b/test/cryogen_core/classpath_able_io/fs_test.clj @@ -34,9 +34,9 @@ (is (sut/path-if-exists fs-root "/File With Space"))) -(deftest should-find-path-empty-base-path +(deftest should-find-path-with-empty-base-path (is - (sut/path-if-exists fs-root "" "/dummy/dummy_from_fs"))) + (sut/path-if-exists fs-root nil "/dummy/dummy_from_fs"))) (deftest test-list-entries-for-dir