Mercurial > hg > openttd
diff src/unix.cpp @ 6755:28c91ad7e697 draft
(svn r9990) -Fix: MorphOS and AmigaOS do not like "//" in filenames as that means the same as "/../" in means in Unix.
author | rubidium <rubidium@openttd.org> |
---|---|
date | Wed, 30 May 2007 18:24:54 +0000 |
parents | 366317684a80 |
children | dc96989488d7 |
line wrap: on
line diff
--- a/src/unix.cpp +++ b/src/unix.cpp @@ -87,8 +87,11 @@ if (FiosIsRoot(path)) { snprintf(filename, lengthof(filename), "%s:%s", path, ent->d_name); } else // XXX - only next line! +#else + assert(path[strlen(path) - 1] == PATHSEPCHAR); + if (strlen(path) > 2) assert(path[strlen(path) - 2] != PATHSEPCHAR); #endif - snprintf(filename, lengthof(filename), "%s" PATHSEP "%s", path, ent->d_name); + snprintf(filename, lengthof(filename), "%s%s", path, ent->d_name); return stat(filename, sb) == 0; }