diff options
author | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-11-18 09:09:25 +0000 |
---|---|---|
committer | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-11-18 09:09:25 +0000 |
commit | a8abed1256fe6e800d240b5ca3ddce1b4fec67a5 (patch) | |
tree | 8fb6fddc6a0947a336c37801652688a34f5ba2d6 /file.c | |
parent | ed9a1f3e8fc3f8ccc6fd824dd11e28afb3582e76 (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.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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; |