mirror of
https://github.com/Maschell/JNUSTool.git
synced 2025-02-17 17:06:24 +01:00
Fixed handling of downloaded directories
Broke the download with the last commit/release <.< Fixed it now!
This commit is contained in:
parent
6dead58500
commit
321475240e
BIN
jar/JNUSTool.jar
BIN
jar/JNUSTool.jar
Binary file not shown.
BIN
release.zip
BIN
release.zip
Binary file not shown.
@ -207,8 +207,13 @@ public class FEntry implements IHasName{
|
|||||||
|
|
||||||
|
|
||||||
public void downloadAndDecrypt(Progress progress) {
|
public void downloadAndDecrypt(Progress progress) {
|
||||||
|
if(isDir()){
|
||||||
|
Util.createSubfolder(getDownloadPath() + "/" + getFileName());
|
||||||
|
return;
|
||||||
|
}
|
||||||
Util.createSubfolder(fst.getTmd().getNUSTitle().getTargetPath() + getFullPath());
|
Util.createSubfolder(fst.getTmd().getNUSTitle().getTargetPath() + getFullPath());
|
||||||
|
|
||||||
|
|
||||||
if(localValidDecryptedFileFound()){
|
if(localValidDecryptedFileFound()){
|
||||||
if(progress != null){
|
if(progress != null){
|
||||||
progress.finish();
|
progress.finish();
|
||||||
|
@ -19,7 +19,7 @@ import de.mas.jnustool.util.Util;
|
|||||||
|
|
||||||
public class Starter {
|
public class Starter {
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
Logger.log("JNUSTool 0.3 - by Maschell");
|
Logger.log("JNUSTool 0.3a - by Maschell");
|
||||||
Logger.log("");
|
Logger.log("");
|
||||||
try {
|
try {
|
||||||
Settings.readConfig();
|
Settings.readConfig();
|
||||||
|
@ -403,10 +403,7 @@ public class Decryption {
|
|||||||
|
|
||||||
|
|
||||||
public void decrypt(FEntry fileEntry,String outputPath) throws IOException {
|
public void decrypt(FEntry fileEntry,String outputPath) throws IOException {
|
||||||
if(fileEntry.isDir()){
|
|
||||||
new File(outputPath + "/" + fileEntry.getFileName()).mkdir();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
InputStream input = new FileInputStream(fileEntry.getContentPath());
|
InputStream input = new FileInputStream(fileEntry.getContentPath());
|
||||||
|
|
||||||
FileOutputStream outputStream = new FileOutputStream(outputPath + "/" + fileEntry.getFileName());
|
FileOutputStream outputStream = new FileOutputStream(outputPath + "/" + fileEntry.getFileName());
|
||||||
|
Loading…
x
Reference in New Issue
Block a user