X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=Tools%2FDiskTool%2Fhelpers.c;h=f2aa26d94de5ceb8f2b0484af2e0fd68e1b72a68;hb=49e5712c717c8960e12097e976335ed955e6cd50;hp=f9e3bc4a27810672a56228e61262eb99836c64b5;hpb=c3b821ccc009ec819f2580a53c0ed423aad43bf9;p=tpg%2Facess2.git diff --git a/Tools/DiskTool/helpers.c b/Tools/DiskTool/helpers.c index f9e3bc4a..f2aa26d9 100644 --- a/Tools/DiskTool/helpers.c +++ b/Tools/DiskTool/helpers.c @@ -61,12 +61,15 @@ size_t DiskTool_int_TranslatePath(char *Buffer, const char *Path) } len = strlen("/Native"); - len += strlen( gsWorkingDirectory ) + 1; + if( Path[0] != '/' ) + len += strlen( gsWorkingDirectory ) + 1; len += strlen(Path); if( Buffer ) { strcpy(Buffer, "/Native"); - strcat(Buffer, gsWorkingDirectory); - strcat(Buffer, "/"); + if( Path[0] != '/' ) { + strcat(Buffer, gsWorkingDirectory); + strcat(Buffer, "/"); + } strcat(Buffer, Path); } }