mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* win32/win32.c (rb_w32_getcwd): remvoed duplicated code.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26951 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
bf45c36d5f
commit
724f1f4a6e
2 changed files with 5 additions and 6 deletions
|
@ -1,3 +1,7 @@
|
||||||
|
Tue Mar 16 14:47:55 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
|
* win32/win32.c (rb_w32_getcwd): remvoed duplicated code.
|
||||||
|
|
||||||
Tue Mar 16 14:06:13 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
Tue Mar 16 14:06:13 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
* include/ruby/encoding.h (ENC_TO_ENCINDEX): suppress warnings.
|
* include/ruby/encoding.h (ENC_TO_ENCINDEX): suppress warnings.
|
||||||
|
|
|
@ -3579,7 +3579,6 @@ char *
|
||||||
rb_w32_getcwd(char *buffer, int size)
|
rb_w32_getcwd(char *buffer, int size)
|
||||||
{
|
{
|
||||||
char *p = buffer;
|
char *p = buffer;
|
||||||
char *bp;
|
|
||||||
int len;
|
int len;
|
||||||
|
|
||||||
len = GetCurrentDirectory(0, NULL);
|
len = GetCurrentDirectory(0, NULL);
|
||||||
|
@ -3610,11 +3609,7 @@ rb_w32_getcwd(char *buffer, int size)
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (bp = p; *bp != '\0'; bp = CharNext(bp)) {
|
translate_char(p, '\\', '/');
|
||||||
if (*bp == '\\') {
|
|
||||||
*bp = '/';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return p;
|
return p;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue