Home Download Buy Blog Forum Support

File fails to open when opened via Perforce [Windows]

File fails to open when opened via Perforce [Windows]

Postby alextiley on Thu Feb 23, 2012 5:22 pm

When opening any file that's not on my hard drive (e.g. network drive) the file fails to open and the text area appears empty. This only happens when I open a file from Perforce (P4V - version control). See the log message below, straight from the console.

Unable to open /C/my-network-server/opt/www/alextiley/public_website/style/global.css

It looks to me as if Sublime thinks the file is on my C drive. It's not - the full path is /my-network-server/opt/www/alextiley/public_website/style/global.css. Opening files from perforce has been completely fine since I first started using Sublime Text 2 - the issue has arisen since the last update (Thursday 22nd Feb, 2012).
Last edited by alextiley on Thu Feb 23, 2012 6:18 pm, edited 3 times in total.
alextiley
 
Posts: 4
Joined: Thu Feb 23, 2012 10:41 am

Re: File fails to open when opened from network drive [Windows]

Postby alexrussell on Thu Feb 23, 2012 5:45 pm

How are you trying to open the file, specifically? I always open files by dragging them into the editor, but files on network shares open fine for me. As does doing ctrl+o and typing the UNC path in (e.g., \\machine\path\to\file.txt).

Interestingly, the path you have there doesn't look like a proper path on windows, maybe that's the issue? (But maybe it's Sublime converting a valid UNC path to some internal representation incorrectly.)
alexrussell
 
Posts: 74
Joined: Fri Jul 15, 2011 9:06 am

Re: File fails to open when opened from network drive [Windows]

Postby alextiley on Thu Feb 23, 2012 6:16 pm

alexrussell wrote:How are you trying to open the file, specifically? I always open files by dragging them into the editor, but files on network shares open fine for me. As does doing ctrl+o and typing the UNC path in (e.g., \\machine\path\to\file.txt).

Interestingly, the path you have there doesn't look like a proper path on windows, maybe that's the issue? (But maybe it's Sublime converting a valid UNC path to some internal representation incorrectly.)


I've just modified my original post. The issue occurs when opening a file from Perforce. It seems after some investigation that when opening straight from the network drive it displays correctly. It only occurs when opening via perforce. This is a new bug as opening via Perforce worked fine before yesterdays update.
alextiley
 
Posts: 4
Joined: Thu Feb 23, 2012 10:41 am

Re: File fails to open when opened via Perforce [Windows]

Postby jaraco on Fri Mar 02, 2012 6:13 pm

I'm having this problem also, and I don't use perforce.

I just run the following command from the Powershell command-line:

Code: Select all
sublime_text.exe \\drake\users\jaraco\Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1


It launches Sublime Text 2 with a new file with the following path:

Code: Select all
C:\drake\users\jaraco\Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1


In other words, it appears to be treating the leading double-backslash as a single backslash.

I get the same behavior if I try to escape the backslashes using \\\\drake\users\... or if I use forward slashes as in //drake/users/...

If I attempt to open the file using the File | Open dialog, it will open. The problem appears to be with the command-line handling.

This is a regression in 2181 from the previous release.
jaraco
 
Posts: 8
Joined: Thu Jan 26, 2012 6:53 pm


Return to Technical Support

Who is online

Users browsing this forum: Google [Bot] and 40 guests