Fixed handling of downloaded directories

Broke the download with the last commit/release <.< Fixed it now!
This commit is contained in:
Maschell 2016-11-23 17:46:14 +01:00
parent 6dead58500
commit 321475240e
5 changed files with 7 additions and 5 deletions

Binary file not shown.

Binary file not shown.

View File

@ -207,8 +207,13 @@ public class FEntry implements IHasName{
public void downloadAndDecrypt(Progress progress) {
if(isDir()){
Util.createSubfolder(getDownloadPath() + "/" + getFileName());
return;
}
Util.createSubfolder(fst.getTmd().getNUSTitle().getTargetPath() + getFullPath());
if(localValidDecryptedFileFound()){
if(progress != null){
progress.finish();

View File

@ -19,7 +19,7 @@ import de.mas.jnustool.util.Util;
public class Starter {
public static void main(String[] args) {
Logger.log("JNUSTool 0.3 - by Maschell");
Logger.log("JNUSTool 0.3a - by Maschell");
Logger.log("");
try {
Settings.readConfig();

View File

@ -403,10 +403,7 @@ public class Decryption {
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());
FileOutputStream outputStream = new FileOutputStream(outputPath + "/" + fileEntry.getFileName());