Fix MS Visual C build: prevent double slashes in pathname at seek. Thanks to Ianos Gnatiuc 2:469/335.155

This commit is contained in:
Stas Degteff 2005-08-08 08:43:21 +00:00
parent c28a5f2b7f
commit 52f60a8ee1

View File

@ -121,7 +121,9 @@ void gposixdir::cd(const char *name, bool relative)
ok = maketruepath(dirname);
entries.clear();
ndirname = dirname;
ndirname += "/*";
if (ndirname[ndirname.size()-1] != '/')
ndirname += "/";
ndirname += "*";
struct _finddata_t de;
long d = _findfirst(ndirname.c_str(), &de);
if(d == -1) {