mirror of
https://github.com/JGRennison/OpenTTD-patches.git
synced 2024-11-17 21:25:40 +00:00
(svn r3057) - (Post)Fix: fix backslash occurence in all cases, also when going to root directory through 'parent directory', and of course don't show parent dir in root.
This commit is contained in:
parent
6bf4e4af3c
commit
d4463b4b95
5
win32.c
5
win32.c
@ -671,7 +671,7 @@ FiosItem *FiosGetSavegameList(int *num, int mode)
|
||||
_fios_path = _fios_save_path;
|
||||
|
||||
// Parent directory, only if not of the type C:\.
|
||||
if (_fios_path[3] != '\0') {
|
||||
if (_fios_path[2] != '\0') {
|
||||
fios = FiosAlloc();
|
||||
fios->type = FIOS_TYPE_PARENT;
|
||||
fios->mtime = 0;
|
||||
@ -905,10 +905,7 @@ char *FiosBrowseTo(const FiosItem *item)
|
||||
|
||||
case FIOS_TYPE_PARENT:
|
||||
s = strrchr(path, '\\');
|
||||
if (s != path + 2)
|
||||
s[0] = '\0';
|
||||
else
|
||||
s[1] = '\0';
|
||||
break;
|
||||
|
||||
case FIOS_TYPE_DIR:
|
||||
|
Loading…
Reference in New Issue
Block a user