From 3ecb126e9275b8a071e66f6bc4b784b61281bc7e Mon Sep 17 00:00:00 2001 From: usa Date: Mon, 26 May 2008 07:45:49 +0000 Subject: * file.c (ntfs_tail): filename which starts with '.' is valid. * file.c (file_expand_path): cygwin symlink support. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16609 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- file.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'file.c') diff --git a/file.c b/file.c index e695582d04..d5f39c7979 100644 --- a/file.c +++ b/file.c @@ -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; -- cgit v1.2.3