developersu / ns-usbloader

Awoo Installer and GoldLeaf uploader of the NSPs (and other files), RCM payload injector, application for split/merge files.
GNU General Public License v3.0
1.87k stars 127 forks source link

allow directories to be used to fill filelist #74

Open Cerbis opened 4 years ago

Cerbis commented 4 years ago

This change allows also to pass directories to the cli. It makes it simpler to add multiple files.

developersu commented 4 years ago

Could you please update it by adding split-files support?

Your construction that replaces https://github.com/developersu/ns-usbloader/blob/adabfbe860a059adceeed06f94303d0cd745ee3a/src/main/java/nsusbloader/cli/TinfoilNetCli.java#L122-L123 doesn't cover this case, however in UI (and in CLI) users can select split-files.

Please feel free to tell you thoughts.

Thanks!

Cerbis commented 4 years ago

If it's okay for you, i would like to keep the change like that. The only change is that a user can also pass a directory instead of files only, the behavior stays the same.

I'm not familiar with the split-files support (and were it happens), so if the current change doesn't break anything i would like to leave it for another merge request.

developersu commented 4 years ago

It breaks this function because it's possible to set slit-files (that are folder) as an input value.

For each of USB-related transfer methods such validation implemented here (extends this class)

For Net-transfers it's here: https://github.com/developersu/ns-usbloader/blob/adabfbe860a059adceeed06f94303d0cd745ee3a/src/main/java/nsusbloader/COM/NET/NetworkSetupValidator.java#L65-L88