For FSNodeUNIX, use actual symlink name instead of underlying name (fixes #325),

This commit is contained in:
Stephen Anthony 2018-08-06 11:22:55 -02:30
parent 68eec27c5c
commit 64fd3f50f9
2 changed files with 12 additions and 6 deletions

View File

@ -52,8 +52,11 @@
* Fixed emulator crash when starting SaveKey ROMs from commandline with
SaveKey messages enabled.
* Fixed missing TV format update in frame stats dialog when switching display
type.
* Fixed missing TV format update in frame stats dialog when switching
display type.
* For UNIX systems: in the ROM launcher, when using symlinks use the
symlink pathname instead of the underlying filesystem pathname.
* Updated PAL palette.

View File

@ -63,10 +63,13 @@ FilesystemNodePOSIX::FilesystemNodePOSIX(const string& p, bool verify)
_path.replace(0, 1, home);
}
// Get absolute path
char buf[MAXPATHLEN];
if(realpath(_path.c_str(), buf))
_path = buf;
// Get absolute path (only used for relative directories)
if(_path[0] == '.')
{
char buf[MAXPATHLEN];
if(realpath(_path.c_str(), buf))
_path = buf;
}
_displayName = lastPathComponent(_path);