mirror of
https://github.com/RubyMetric/chsrc.git
synced 2025-01-24 01:39:29 +08:00
Fix current dir case
This commit is contained in:
parent
3f8f8b0619
commit
ae72e78592
10
include/xy.h
10
include/xy.h
|
@ -780,11 +780,21 @@ xy_parent_dir (const char *path)
|
|||
if (xy_on_windows)
|
||||
{
|
||||
last = strrchr (dir, '\\');
|
||||
if (!last)
|
||||
{
|
||||
/* current dir */
|
||||
return ".";
|
||||
}
|
||||
*last = '\0';
|
||||
}
|
||||
else
|
||||
{
|
||||
last = strrchr (dir, '/');
|
||||
if (!last)
|
||||
{
|
||||
/* current dir */
|
||||
return ".";
|
||||
}
|
||||
*last = '\0';
|
||||
}
|
||||
return dir;
|
||||
|
|
Loading…
Reference in New Issue
Block a user