Sublime Forum

[BUG] 2115: Equivalent path names treated as different files

#1

Apologies: this is a duplicate of the following post:

but I have seenno response, and I think it may be because I did not mark the post as a “[BUG]”. Also, I do no tknow if it is possible to change the title of a post after the fact… so, again, apologies, and here goes:

I am experiencing the following behavior on both Mac and Windows with 2115: from the Terminal, if I invoke

subl “/Users/marciano/Documents/file.tex”

and then

subl “/Users/marciano/Documents/./file.tex”

I get two open tabs, pointing to the same file, but with a different file name (as verified by hovering). [Of course, on Windows, replace “/” with “”]

Furthermore, on Windows, if from the command line I invoke

sublime_text.exe “C:\Users\marciano\Documents\file.tex”:100

and then

sublime_text.exe “c:\Users\marciano\Documents\file.tex”:100

[with a lowercase drive letter “c:” instead of "C:] again I get two open tabs. However, if I omit the line number, this is not the case!

Is this behavior intended? On the Mac, TextMate always jumps to the correct file regardless of whether or not “/./” is added to the file name. Also, on Windows, TeXnicCenter does not care if the drive letter is upper or lower case.

0 Likes

#2

OK, an update: on OSX, with version 2117, I can no longer duplicate the behavior mentioned. Maybe I was doing something stupid before?

HOWEVER, I can confirm that the behavior is still present on Windows. Furthermore, once you invoke ST2 from the command line, with

sublime_text.exe “C:\Users\marciano\Documents\file.tex”:100

and then

sublime_text.exe “c:\Users\marciano\Documents\file.tex”:100

you get two separate files, “C:\Users\marciano\Documents\file.tex” and “c:\Users\Documents\file.tex” in the Open Recent menu. From there, if you select each of these in turn, you do get two separate tabs. That seems wrong, no?

0 Likes

#3

I fixed the first issue in 2116, but missed adding it to the changelog. Opening the same file using upper case vs lower case is still outstanding.

0 Likes

#4

Thanks!!!

Looking forward to the case fix :smile:

0 Likes

#5

It seems like the Windows issue of of opening two files when there’s a drive letter case difference is gone.

But what still happens is that if the opened file has the lower case driver letter (generally happens for me when I drag and drop a file from Explorer), searches hit that file twice, one for the upper and one for the lower case, duplicating entries in the search results.

EDIT: I’m using the latest 2.0.1 release build.

0 Likes