|
|
@ -181,6 +181,8 @@ public class SaveAttachmentTask extends ProgressDialogAsyncTask<SaveAttachmentTa
|
|
|
|
fileName = base + "." + extension;
|
|
|
|
fileName = base + "." + extension;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
fileName = new File(fileName).getName();
|
|
|
|
|
|
|
|
|
|
|
|
int i = 0;
|
|
|
|
int i = 0;
|
|
|
|
File file = new File(outputDirectory, fileName);
|
|
|
|
File file = new File(outputDirectory, fileName);
|
|
|
|
|
|
|
|
|
|
|
@ -189,6 +191,10 @@ public class SaveAttachmentTask extends ProgressDialogAsyncTask<SaveAttachmentTa
|
|
|
|
file = new File(outputDirectory, fileParts[0] + "-" + (++i) + "." + fileParts[1]);
|
|
|
|
file = new File(outputDirectory, fileParts[0] + "-" + (++i) + "." + fileParts[1]);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (file.isHidden()) {
|
|
|
|
|
|
|
|
throw new IOException("Specified name would not be visible");
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
return file;
|
|
|
|
return file;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|