halfwhole / luminus-downloader

Downloads files and folders from LumiNUS
MIT License
11 stars 4 forks source link

Downloaded .zip files in are in Windows format instead of Unix #2

Closed halfwhole closed 4 years ago

halfwhole commented 4 years ago

problem

Backslashes in Windows paths screw up the downloaded .zip file, and so it can't be extracted properly. This also happens when you download the .zip file as a folder from LumiNUS directly; it gives the same bad result. Dammit, LumiNUS. 😡

Sigh, have to find some way to either write the downloaded buffer as a Unix-formatted .zip file, or convert it after it's been written.

halfwhole commented 4 years ago

Fixed as of the latest commit https://github.com/halfwhole/luminus-downloader/commit/fbd4ab3e4a87f95c622ea6d286a4af8040736a12. Used 7zip to rename all backslashes in file names to forward slashes.

Whew, LumiNUS is wild.

halfwhole commented 4 years ago

Update: a couple days ago, I opened a request describing the issue with the CIT help desk/LumiNUS team, and they're working on it. Kudos to them for the quick response, hope it'll get fixed soon.

EDIT (19/08/2020): Fix has been applied by the CIT team! The problem has been resolved, but I'll just leave the relevant function fixBackSlashedZipFile in there as a safeguard.