Open OdatNurd opened 3 years ago
In my mind, sublime-package files are not resource files. They are pre-packaged package folders (containing resource files) and should thus not be returned by sublime.find_resources
. It even caught the built-in View Package File
command by surprise.
Description
The API endpoint
sublime.find_resources()
finds and returnssublime-package
files from inside of thePackages
folder that contains the packages that ship directly with Sublime, in cases where the file pattern would match (such as''
for all files or'*.sublime-package'
for package files).It's unclear whether this is intentional or not (I assume not), but it causes
View Package File
to display the shipped packages in the list, which are binary and thus not really viewable.Checking through past versions shows that this started occurring with build 4114; prior to that this endpoint worked as one would expect.
Steps to reproduce
View > Show Console
sublime.find_resources('*.sublime-package')
and press enterExpected behavior
The results of this should be an empty array because package files are not themselves resources.
Actual behavior
The API endpoint provides a list of all of the shipped packages. This appears to only be default shipped packages; files from
Installed Packages
are not listed here.Environment