Skip to content
Snippets Groups Projects
Commit c516e19a authored by Nick Vercammen's avatar Nick Vercammen Committed by Kyle Doherty
Browse files

Provide fix so windows paths get determined correctly when loading metabase in cider (#11705)

parent 6c1fa80f
No related branches found
No related tags found
No related merge requests found
......@@ -12,7 +12,7 @@
[metabase.util.i18n :refer [trs]])
(:import java.io.FileNotFoundException
java.net.URL
[java.nio.file CopyOption Files FileSystem FileSystems LinkOption OpenOption Path StandardCopyOption]
[java.nio.file CopyOption Files FileSystem FileSystems LinkOption OpenOption Path Paths StandardCopyOption]
java.nio.file.attribute.FileAttribute
java.util.Collections))
......@@ -109,7 +109,7 @@
(if (url-inside-jar? url)
(with-open [fs (jar-file-system-from-url url)]
(f (get-path-in-filesystem fs "/" resource)))
(f (get-path (.getPath url))))))
(f (get-path (.toString (Paths/get (.toURI url))))))))
(defmacro with-open-path-to-resource
"Execute `body` with an Path to a resource file or directory (i.e. a file in the project `resources/` directory, or
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment