Open Clearmist opened 1 year ago
Hi,
Thank you for this well written bug report. (And debugging the issue for me)
I think I was too ambitious with the the extract command making it too versatile. Resulting in weird bugs.
This means we need to clarify and separate some parameters so we can rely on separate functions instead of one big function.
You are make a good point. I'll consider making more explicit commands instead of just fixing the uncaught exception.
I built from commit 17b40911aefabfbc7fd2b57e2197e83d753dd2df on the bugfix-101-fs-extraction-issues branch and these are the new results.
.\nstool.exe --extract "f79d12018da9db962f796fad2256fdfb.cnmt.nca" "D:\Switch\images" "test.nsp"
[WARNING] Extract path was invalid, and was skipped: D:\Switch\images
.\nstool.exe --extract "f79d12018da9db962f796fad2256fdfb.cnmt.nca" "D:\Switch\images\extract.nca" "test.nsp"
[tc::io::LocalFileSystem::getDirectoryListing() ERROR] Failed to open directory (The directory name is invalid.)
Hi, i have the same problem when extracting a single file from a nsp. Which branch or PR have the modified code that i can test please? I only want to get cmnt.nca and the nca that contain the game icon by the way
Also encountering this one, I'll try that branch.
Building with Visual Studio is broken as well.
Version: 1.7.0 Built: 15:09:37 Jan 21 2023 OS: Windows 11
I thoroughly read the documentation about extracting files. I am unable to extract single files from any archive without editing your source code. Even when the program absolutely has write access to the given directory an access is denied error is thrown. This line in FsProcess.cpp is the culprit. I commented out this line and the first try/catch and the file was extracted successfully.
https://github.com/jakcron/nstool/blob/7abcedb7e5d1765616f8d27e8b9be3543c489997/src/FsProcess.cpp#L151
https://github.com/jakcron/nstool/blob/7abcedb7e5d1765616f8d27e8b9be3543c489997/src/FsProcess.cpp#L121-L135
This means we need to clarify and separate some parameters so we can rely on separate functions instead of one big function.
Perhaps:
Confirming this is a valid file
Extracting all files is successful
Extracting a single file fails