summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDarkvater <Darkvater@openttd.org>2005-10-17 22:49:15 +0000
committerDarkvater <Darkvater@openttd.org>2005-10-17 22:49:15 +0000
commit82d0f525e5a4c0512d910f27496f0ee8e65ce041 (patch)
tree9691f1cbdf79f0814830a9e7e56e6706f4b45a74
parent3fb68358226994f11a7c329e0d032f28a88013e2 (diff)
downloadopenttd-82d0f525e5a4c0512d910f27496f0ee8e65ce041.tar.xz
(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.
-rw-r--r--win32.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/win32.c b/win32.c
index f1bc33da5..987a4ee1e 100644
--- a/win32.c
+++ b/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';
+ s[0] = '\0';
break;
case FIOS_TYPE_DIR: