diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2011-02-15 13:47:24 +0300 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2011-02-15 13:47:24 +0300 |
commit | c48947b454fec1bc774059562c217f179e32c0e5 (patch) | |
tree | 5761b1cec9e7e3f885d2f10d515417fb6dea4d1a /winsup/cygwin/fhandler_disk_file.cc | |
parent | ec584208706a1b1006476c5f56ab21ed100bd2f8 (diff) |
* fhandler_disk_file.cc (fhandler_disk_file::readdir_helper): Don't
append slash if there is one already.
Diffstat (limited to 'winsup/cygwin/fhandler_disk_file.cc')
-rw-r--r-- | winsup/cygwin/fhandler_disk_file.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/winsup/cygwin/fhandler_disk_file.cc b/winsup/cygwin/fhandler_disk_file.cc index a1ae8c184..115b746c7 100644 --- a/winsup/cygwin/fhandler_disk_file.cc +++ b/winsup/cygwin/fhandler_disk_file.cc @@ -1831,7 +1831,8 @@ fhandler_disk_file::readdir_helper (DIR *dir, dirent *de, DWORD w32_err, tmp_pathbuf tp; char *file = tp.c_get (); char *p = stpcpy (file, pc.normalized_path); - *p++ = '/'; + if (p[-1] != '/') + *p++ = '/'; sys_wcstombs (p, NT_MAX_PATH - (p - file), fname->Buffer, fname->Length / sizeof (WCHAR)); path_conv fpath (file, PC_SYM_NOFOLLOW); |