Closed Thom1729 closed 3 years ago
N.B. In order to directly test #134, we'd have to create a zipfile with directory entries, which I'm not sure how to do within Python.
N.B. In order to directly test #134, we'd have to create a zipfile with directory entries, which I'm not sure how to do within Python.
Yeah, I tried writing such a file with the zipfile module, but you can't create "files" with trailing slashes. I suppose we need to bundle such a zip as an artifact.
I suppose we need to bundle such a zip as an artifact.
Ugh. You're probably right, but still ugh. I've opened a question on Stack Overflow looking for an alternative.
Do you think this can be merged as-is, punting the direct zipfile test to a future PR?
For #134.
After much research and testing, I determined that the fundamental bug was that every pattern component except for
**
should match at least one character — so/A*B/
should matchAB
, butA/*
shouldn't matchA/
. This behavior should match other glob engines and resolve the linked bug.This behavior varies slightly from
sublime.find_resources('*')
, which will find all resources (likesublime.find_resources('')
.It's probably bad news for other reasons if
sublime.find_resources()
returns directories, but at least now it shouldn't be bad news for us in particular.