mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-22 19:01:15 +00:00
Normalize path always and use it to check if it exists, not argc.
This commit is contained in:
parent
4faee2de0b
commit
e3da52aae3
1 changed files with 2 additions and 2 deletions
|
@ -100,7 +100,8 @@ main(int argc, char** argv, char **env_c)
|
|||
|
||||
if (filetoopen)
|
||||
{
|
||||
exists = [fm fileExistsAtPath: arg isDirectory: &isDir];
|
||||
filetoopen = absolutePath(fm, filetoopen);
|
||||
exists = [fm fileExistsAtPath: filetoopen isDirectory: &isDir];
|
||||
if (exists == NO)
|
||||
{
|
||||
if ([filetoopen hasPrefix: @"/"] == NO
|
||||
|
@ -111,7 +112,6 @@ main(int argc, char** argv, char **env_c)
|
|||
}
|
||||
else
|
||||
{
|
||||
filetoopen = absolutePath(fm, filetoopen);
|
||||
[workspace openFile: filetoopen
|
||||
withApplication: application];
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue