[physfs] Not finding any directories
David.Berry at dcita.gov.au
Thu Dec 16 17:57:52 EST 2004
The path separator has to be hardcoded to a "/"
for (i = rc; *i != NULL; i++)
sprintf (fullPath, "%s%s%s", startPoint, "/", *i);
result = PHYSFS_isDirectory(fullPath);
// if (result != 0)
logToFile("We've got [%s] - [ %i ].", fullPath, result);
09:55:22 > We've got [test/dir_1] - [ 1 ].
09:55:22 > We've got [test/dir_2] - [ 1 ].
09:55:22 > We've got [test/file_1.txt] - [ 0 ].
09:55:22 > We've got [test/file_2.txt] - [ 0 ].
I was trying for platform independence by using PHYSFS_getDirSeparator()
From: Ryan C. Gordon [mailto:icculus at clutteredmind.org]
Sent: Friday, 17 December 2004 9:02 AM
To: physfs at icculus.org
Subject: Re: [physfs] Not finding any directories
> It is showing both files and directories - however,
> isn't picking up the difference between a file and a directory. It
> should be returning a different result for the two.
It's returning 0 because it can't find "dir_1". "dir_1" doesn't exist.
"test/dir_1" does, however, and should return 1.
More information about the physfs