mirror of
https://github.com/openmoh/openmohaa.git
synced 2025-04-28 13:47:58 +03:00
Don't return a slash at the end for directory name
This commit is contained in:
parent
861338b0fc
commit
f7c8c745c4
1 changed files with 7 additions and 6 deletions
|
@ -2448,16 +2448,17 @@ char **FS_ListFilteredFiles( const char *path, const char *extension, const char
|
|||
}
|
||||
// unique the match
|
||||
|
||||
temp = pathLength;
|
||||
if (pathLength) {
|
||||
temp++; // include the '/'
|
||||
}
|
||||
|
||||
if (bDirSearch) {
|
||||
strcpy(zpath, name + pathLength);
|
||||
zpath[length - pathLength - 1] = 0;
|
||||
strcpy(zpath, name + temp);
|
||||
zpath[length - temp - 1] = 0;
|
||||
nfiles = FS_AddFileToList(zpath, list, nfiles);
|
||||
}
|
||||
else {
|
||||
temp = pathLength;
|
||||
if (pathLength) {
|
||||
temp++; // include the '/'
|
||||
}
|
||||
nfiles = FS_AddFileToList(name + temp, list, nfiles);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue