Sublime Forum

"Open containing folder" fails when file name contains "$"

#1

When right clicking a file whose name contains “$” on the side bar and choosing “Open containing folder”, “This PC” is opened instead of the containing folder.

It works fine for files without “$” in their names, and also using “Open containing folder” from the file itself and not from the sidebar.

I’m using build 3126 on Windows.

0 Likes

Reveal in Finder not working with $ in filename
#2

a similar bug (about a folder or filename containing a comma) has been filed here:

although, I think this issue is a different because probably the issue with $ is that some of the ST commands to open a containing folder allow the use of variables like $file or $packages, so probably it gets confused when it thinks it is a variable that it doesn’t recognize.


proved by creating a file called C:\tmp\$hello.txt and then, in ST3’s console:

view.window().run_command('open_dir', { 'dir': r'C:\tmp', 'file': r'$hello.txt' })
view.window().run_command('open_dir', { 'dir': r'C:\tmp', 'file': r'\$hello.txt' })

escaping the $ works, so I guess ST needs to do this internally for the sidebar’s open_containing_folder command

4 Likes