However - even when someone has a custom folder handler setup - SublimeText currently always opens a folder via Explorer.exe and not through an os-specific way. An alternative to fix this that I have tested is to use os.startfile("C:\folderpath"). For example the following will respect the user's custom directory handler:
- Code: Select all
import sublime, sublime_plugin, os
class OpenContainingDirCommand(sublime_plugin.TextCommand):
def run(self, edit):
branch, leaf = os.path.split(self.view.file_name())
os.startfile(branch)
So please use os.startfile(dirpath) for things such as "Browse Package".
Link to this suggestion on Userecho. Please vote.