diff options
| author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-11-21 16:47:13 +0000 |
|---|---|---|
| committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-11-21 16:47:13 +0000 |
| commit | 0fd2125eab9815e8f0c4b71c36fdda9926313050 (patch) | |
| tree | 1220f0a2645c32eab5eab983646b7c88faf17ef1 | |
| parent | 51e0cceb41b1371a7beef6c407d40e3d54a5f0fa (diff) | |
| download | ruby-0fd2125eab9815e8f0c4b71c36fdda9926313050.tar.gz ruby-0fd2125eab9815e8f0c4b71c36fdda9926313050.tar.xz ruby-0fd2125eab9815e8f0c4b71c36fdda9926313050.zip | |
* file.c (rb_file_s_basename): DOSISH_UNC is defined on cygwin but
DOSISH is not. fixed: [ruby-dev:27797]
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@9580 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
| -rw-r--r-- | ChangeLog | 5 | ||||
| -rw-r--r-- | file.c | 6 |
2 files changed, 8 insertions, 3 deletions
@@ -1,3 +1,8 @@ +Tue Nov 22 01:45:21 2005 Nobuyoshi Nakada <nobu@ruby-lang.org> + + * file.c (rb_file_s_basename): DOSISH_UNC is defined on cygwin but + DOSISH is not. fixed: [ruby-dev:27797] + Mon Nov 21 22:50:48 2005 Nobuyoshi Nakada <nobu@ruby-lang.org> * file.c (rb_path_skip_prefix, rb_file_s_basename): UNC without path @@ -2573,7 +2573,7 @@ rb_file_s_basename(int argc, VALUE *argv) { VALUE fname, fext, basename; char *name, *p; -#ifdef DOSISH +#if defined DOSISH_DRIVE_LETTER || defined DOSISH_UNC char *root; #endif int f; @@ -2585,7 +2585,7 @@ rb_file_s_basename(int argc, VALUE *argv) if (RSTRING(fname)->len == 0 || !*(name = RSTRING(fname)->ptr)) return fname; name = skipprefix(name); -#ifdef DOSISH +#if defined DOSISH_DRIVE_LETTER || defined DOSISH_UNC root = name; #endif while (isdirsep(*name)) @@ -2593,7 +2593,7 @@ rb_file_s_basename(int argc, VALUE *argv) if (!*name) { p = name - 1; f = 1; -#ifdef DOSISH +#if defined DOSISH_DRIVE_LETTER || defined DOSISH_UNC if (name != root) { /* has slashes */ } |
