Replies: 2 comments
-
|
Beta Was this translation helpful? Give feedback.
0 replies
-
Compare with Python:
I.e. it doesn't return the "current" directory in which it searches. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I've run into a problem when trying to use fs/glob to match a path which matches the end of the pattern. For instance
(fs/glob "/Users/derek/tmp/file1" "file1") => [] or
(fs/glob "/Users/derek/tmp/file1" "**file1") => [] both return nothing
but pointing to its parent dir works
(fs/glob "/Users/derek/tmp" "file1") => [#object[sun.nio.fs.UnixPath 0x62a73d2b "/Users/derek/tmp/file1"]]
The above is counter-intuitive to me. Also I can match in this scenario using the standard Java FileSystems matcher and get the expected behavior:
(def jfs (FileSystems/getDefault))
(def match3 (.getPathMatcher jfs "glob:**file1"))
(def f1 (io/file "/Users/derek/tmp/file1"))
(.matches match3 (fs/canonicalize f1)) => true
Maybe I'm misunderstanding something about how you intended glob to be used, but this sounds like a bug to me.
Thanks for taking a look at this
Derek
Beta Was this translation helpful? Give feedback.
All reactions