mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-08-29 17:39:09 +00:00
(svn r7349) -Fix (r7348): Stripping data path didn't work for absolute paths.
This commit is contained in:
@@ -176,7 +176,7 @@ static uint ScanPath(const char *path)
|
|||||||
} else if (sb.st_mode & S_IFREG) {
|
} else if (sb.st_mode & S_IFREG) {
|
||||||
/* File */
|
/* File */
|
||||||
char *ext = strrchr(filename, '.');
|
char *ext = strrchr(filename, '.');
|
||||||
char *file = strchr(filename, PATHSEPCHAR) + 1; // Crop base path
|
char *file = filename + strlen(_path.data_dir) + 1; // Crop base path
|
||||||
|
|
||||||
/* If no extension or extension isn't .grf, skip the file */
|
/* If no extension or extension isn't .grf, skip the file */
|
||||||
if (ext == NULL) continue;
|
if (ext == NULL) continue;
|
||||||
|
Reference in New Issue
Block a user