Closed bpvarsity closed 4 years ago
I commit some changes, please try again. If it still fails, please try to find a small project (few files!) that can be used to reproduce it and share the name here.
Thanks for the response. Seems to be the same issue
Test project for example https://sourceforge.net/projects/mingw/files/MinGW/Extension/dos2unix/dos2unix-7.4.0-1/
Instead of downloading the files it downloads them as a folder and sticks a file called download in it.
dos2unix-7.4.0-1-mingw32-lic.tar.lzma is the file but it makes a folder called dos2unix-7.4.0-1-mingw32-lic.tar.lzma and then a file inside of that folder called download
Got this fixed. I messed up and deleted the $ in front of projects in the url. Sorry about that
Well that fixed it for that test repo if you just do the project as "mingw" only and not the full path. If I tell it a full path I get the issue I had.
For example https://sourceforge.net/projects/$project/files/arm64/20200918/
That will download the files as folders and place a small download file in it. If you open the download file its html code
Thank you for using this script but it really is meant for all files of a whole project.
To only grab a subdirectory you could try to manually edit https://github.com/SpiritQuaddicted/sourceforge-file-download/blob/a7cc38053f4073f1ddcde2449a028f675cfd2d9b/sourceforge-file-downloader.sh#L20 and run the later commands afterwards. It might work, I am not sure.
Selectively grabbing subtrees from a project is out of scope for this script. I am open to a Pull Request but will not actively work on it.
Tried to run this recently and it just downloads blank/empty files and folders.