summaryrefslogtreecommitdiff
path: root/file.c
diff options
context:
space:
mode:
authorusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2005-11-18 09:09:25 +0000
committerusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2005-11-18 09:09:25 +0000
commita8abed1256fe6e800d240b5ca3ddce1b4fec67a5 (patch)
tree8fb6fddc6a0947a336c37801652688a34f5ba2d6 /file.c
parented9a1f3e8fc3f8ccc6fd824dd11e28afb3582e76 (diff)
* file.c (rb_file_s_dirname): should use skipprefix for UNC path.
pointed out by nobu ([ruby-dev:27744]). fixed: [ruby-core:5076] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9563 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'file.c')
-rw-r--r--file.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/file.c b/file.c
index 669929b606..e427cedade 100644
--- a/file.c
+++ b/file.c
@@ -2626,8 +2626,8 @@ rb_file_s_dirname(VALUE klass, VALUE fname)
name = StringValueCStr(fname);
root = skiproot(name);
#ifdef DOSISH_UNC
- if (root > name + 2 && isdirsep(*name))
- name = root - 2;
+ if (root > name + 1 && isdirsep(*name))
+ root = skipprefix(name = root - 2);
#else
if (root > name + 1)
name = root - 1;