summaryrefslogtreecommitdiff
path: root/dir.c
diff options
context:
space:
mode:
Diffstat (limited to 'dir.c')
-rw-r--r--dir.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/dir.c b/dir.c
index fc0b6f5..0d0f078 100644
--- a/dir.c
+++ b/dir.c
@@ -332,6 +332,13 @@ find_directory (name)
#ifdef VMS
if (vmsstat_dir (name, &st) < 0)
#else
+
+#ifdef WINDOWS32
+ /* Remove any trailing '\'. Windows32 stat fails even on valid
+ directories if they end in '\'. */
+ if (p[-1] == '\\')
+ p[-1] = '\0';
+#endif
if (stat (name, &st) < 0)
#endif
{