Refactored path normalization for project directory.

This commit is contained in:
Paul Kulchenko
2015-02-05 11:11:30 -08:00
parent ea3c98c65f
commit 216a1e5350
3 changed files with 3 additions and 6 deletions

View File

@@ -50,9 +50,7 @@ if success then -- ok, server was started, we are solo
if filename then
RequestAttention()
if wx.wxDirExists(filename) then
local dir = wx.wxFileName.DirName(filename)
dir:Normalize() -- turn into absolute path if needed
ProjectUpdateProjectDir(dir:GetFullPath())
ProjectUpdateProjectDir(filename)
elseif not ActivateFile(filename) then
DisplayOutputLn(TR("Can't open file '%s': %s"):format(filename, wx.wxSysErrorMsg()))
end