* 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
This commit is contained in:
usa 2008-05-26 07:45:49 +00:00
Родитель 701890adfc
Коммит 3ecb126e92
2 изменённых файлов: 8 добавлений и 1 удалений

Просмотреть файл

@ -1,3 +1,9 @@
Mon May 26 16:41:35 2008 NAKAMURA Usaku <usa@ruby-lang.org>
* file.c (ntfs_tail): filename which starts with '.' is valid.
* file.c (file_expand_path): cygwin symlink support.
Mon May 26 07:15:52 2008 Nobuyoshi Nakada <nobu@ruby-lang.org> Mon May 26 07:15:52 2008 Nobuyoshi Nakada <nobu@ruby-lang.org>
* vm_dump.c (rb_vm_bugreport): rb_make_backtrace has no arguments. * vm_dump.c (rb_vm_bugreport): rb_make_backtrace has no arguments.

3
file.c
Просмотреть файл

@ -2555,6 +2555,7 @@ rb_path_end(const char *path)
static char * static char *
ntfs_tail(const char *path) ntfs_tail(const char *path)
{ {
while (*path == '.') path++;
while (*path && *path != ':') { while (*path && *path != ':') {
if (istrailinggabage(*path)) { if (istrailinggabage(*path)) {
const char *last = path++; const char *last = path++;
@ -2869,7 +2870,7 @@ file_expand_path(VALUE fname, VALUE dname, VALUE result)
#ifdef __CYGWIN__ #ifdef __CYGWIN__
if (lnk_added && len > 4 && if (lnk_added && len > 4 &&
STRCASECMP(wfd.cFileName + len - 4, ".lnk") == 0) { STRCASECMP(wfd.cFileName + len - 4, ".lnk") == 0) {
len -= 4; wfd.cFileName[len -= 4] = '\0';
} }
#endif #endif
if (!p) p = buf; if (!p) p = buf;