git.ucc.asn.au
/
tpg
/
acess2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Usermode/libc - Fix strchr and strrchr behavior
[tpg/acess2.git]
/
Tools
/
DiskTool
/
helpers.c
diff --git
a/Tools/DiskTool/helpers.c
b/Tools/DiskTool/helpers.c
index
f9e3bc4
..
7835169
100644
(file)
--- a/
Tools/DiskTool/helpers.c
+++ b/
Tools/DiskTool/helpers.c
@@
-41,7
+41,7
@@
size_t DiskTool_int_TranslatePath(char *Buffer, const char *Path)
const char *pos;
for(pos = Path; pos < colon; pos ++)
{
const char *pos;
for(pos = Path; pos < colon; pos ++)
{
- if( !isal
pha
(*pos) )
+ if( !isal
num
(*pos) )
goto native_path;
}
goto native_path;
}
@@
-61,12
+61,15
@@
size_t DiskTool_int_TranslatePath(char *Buffer, const char *Path)
}
len = strlen("/Native");
}
len = strlen("/Native");
- len += strlen( gsWorkingDirectory ) + 1;
+ if( Path[0] != '/' )
+ len += strlen( gsWorkingDirectory ) + 1;
len += strlen(Path);
if( Buffer ) {
strcpy(Buffer, "/Native");
len += strlen(Path);
if( Buffer ) {
strcpy(Buffer, "/Native");
- strcat(Buffer, gsWorkingDirectory);
- strcat(Buffer, "/");
+ if( Path[0] != '/' ) {
+ strcat(Buffer, gsWorkingDirectory);
+ strcat(Buffer, "/");
+ }
strcat(Buffer, Path);
}
}
strcat(Buffer, Path);
}
}
UCC
git Repository :: git.ucc.asn.au