From 52f60a8ee191447c0fb3a8f17829a2bba4d5ca19 Mon Sep 17 00:00:00 2001 From: Stas Degteff Date: Mon, 8 Aug 2005 08:43:21 +0000 Subject: [PATCH] Fix MS Visual C build: prevent double slashes in pathname at seek. Thanks to Ianos Gnatiuc 2:469/335.155 --- goldlib/gall/gdirposx.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/goldlib/gall/gdirposx.cpp b/goldlib/gall/gdirposx.cpp index ee45613..46a6897 100644 --- a/goldlib/gall/gdirposx.cpp +++ b/goldlib/gall/gdirposx.cpp @@ -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) {