Home Download Buy Blog Forum Support

[SOLVED] current folder wrong when using unc path in windows

[SOLVED] current folder wrong when using unc path in windows

Postby Saxi on Sun Apr 14, 2013 2:41 pm

If you open a file via UNC path in Windows, ST2 inaccurately reports the current working directory as C:\Windows
This causes problems with plugins like Git when you try to use git on a network share, it believes all files reside in C:\windows and will not correctly look at the git repository in the directory.
Last edited by Saxi on Tue Apr 16, 2013 8:30 pm, edited 1 time in total.
Saxi
 
Posts: 102
Joined: Mon Nov 19, 2012 1:37 pm

Re: current folder wrong when using unc path in windows

Postby Saxi on Mon Apr 15, 2013 5:44 pm

I tested this under ST3, same behavior.
Saxi
 
Posts: 102
Joined: Mon Nov 19, 2012 1:37 pm

Re: current folder wrong when using unc path in windows

Postby jps on Tue Apr 16, 2013 12:04 am

What you do mean by current folder here?

Sublime Text resets its current directory to the executable path on startup, and never changes it again.
jps
Site Admin
 
Posts: 3069
Joined: Wed Mar 19, 2008 12:33 pm

Re: current folder wrong when using unc path in windows

Postby Saxi on Tue Apr 16, 2013 8:27 pm

[quote="jps"]What you do mean by current folder here?

I just tried this in ST2 and got a different message that helps me figure out what is going on.
Before it just said C:\Windows isn't a repository, now I am getting:

'\\NAS01\git\Corona\Libraries\Table'
CMD.EXE was started with the above path as the current directory.
UNC paths are not supported. Defaulting to Windows directory.
fatal: pathspec 'main.lua' did not match any files

So that problem isn't Sublime, it is Git plugin using CMD starting folder (which currently doesn't support UNC).

Sorry, not Sublime related.
Thanks for the follow up.

I wanted to avoid it, but the only way I see around this is to map a drive to the share.
Saxi
 
Posts: 102
Joined: Mon Nov 19, 2012 1:37 pm


Return to Technical Support

Who is online

Users browsing this forum: No registered users and 14 guests