summaryrefslogtreecommitdiff
path: root/file.c
diff options
context:
space:
mode:
authoreban <eban@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-08-20 10:42:57 +0000
committereban <eban@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-08-20 10:42:57 +0000
commit3ca366515708985c2ea7d6ab07e38cf8212ee3d9 (patch)
tree48e58db19bbd42748b35561a9e3b12b24ce3fcd4 /file.c
parent794bc17d1d2caa92bc9975780a110237a9ed129c (diff)
* file.c (rb_file_s_expand_path): accept drive letter on Cygwin.
* file.c (is_absolute_path): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_6@2726 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 a2b7966457..c7e0628930 100644
--- a/file.c
+++ b/file.c
@@ -1271,7 +1271,7 @@ rb_file_s_expand_path(argc, argv)
#endif
}
}
-#if defined DOSISH
+#if defined DOSISH || __CYGWIN__
/* skip drive letter */
else if (ISALPHA(s[0]) && s[1] == ':' && isdirsep(s[2])) {
while (*s && !isdirsep(*s)) {
@@ -2060,7 +2060,7 @@ is_absolute_path(path)
const char *path;
{
if (path[0] == '/') return 1;
-# if defined DOSISH
+# if defined DOSISH || defined __CYGWIN__
if (path[0] == '\\') return 1;
if (strlen(path) > 2 && path[1] == ':') return 1;
# endif