Make the directory test pass

The test for this might need to be extended to see what happens with
multiple sub folders and large files, and i do question the expected
size of '..'
This commit is contained in:
kev :) 2012-11-14 21:24:57 +00:00
parent 1e854170e4
commit 3764f48bee
3 changed files with 6 additions and 3 deletions

View File

@ -289,7 +289,10 @@ std::vector<PSPFileInfo> DirectoryFileSystem::GetDirListing(std::string path)
else
entry.type = FILETYPE_NORMAL;
entry.size = findData.nFileSizeLow | ((u64)findData.nFileSizeHigh<<32);
if (!strcmp(findData.cFileName, "..") )// TODO: is this just for .. or all sub directories? Need to add a directory to the test to find out. Also why so different than the old test results?
entry.size = 4096;
else
entry.size = findData.nFileSizeLow | ((u64)findData.nFileSizeHigh<<32);
entry.name = findData.cFileName;
myVector.push_back(entry);

View File

@ -245,7 +245,7 @@ void __IoGetStat(SceIoStat *stat, PSPFileInfo &info)
else
type = SCE_STM_FREG, attr = TYPE_FILE;
stat->st_mode = 0777 | type;
stat->st_mode = type; //0777 | type;
stat->st_attr = attr;
stat->st_size = info.size;
stat->st_private[0] = info.startSector;

View File

@ -36,6 +36,7 @@ tests_good = [
"power/power",
"rtc/rtc",
"umd/callbacks/umd",
"io/directory/directory",
]
tests_next = [
@ -55,7 +56,6 @@ tests_next = [
"hle/check_not_used_uids",
"font/fonttest",
"io/cwd/cwd",
"io/directory/directory",
"io/io/io",
"io/iodrv/iodrv",
"modules/loadexec/loader",