diff options
Diffstat (limited to 'file.c')
-rw-r--r-- | file.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -2555,6 +2555,7 @@ rb_path_end(const char *path) static char * ntfs_tail(const char *path) { + while (*path == '.') path++; while (*path && *path != ':') { if (istrailinggabage(*path)) { const char *last = path++; @@ -2869,7 +2870,7 @@ file_expand_path(VALUE fname, VALUE dname, VALUE result) #ifdef __CYGWIN__ if (lnk_added && len > 4 && STRCASECMP(wfd.cFileName + len - 4, ".lnk") == 0) { - len -= 4; + wfd.cFileName[len -= 4] = '\0'; } #endif if (!p) p = buf; |