ignore backup dir when same as source dir

This commit is contained in:
Pavol Zibrita 2012-04-03 03:28:56 +02:00
parent 447a4e05a8
commit 0b17da9d5d

View file

@ -402,7 +402,7 @@ public class IndexUploader {
File toUpload = zipFile;
boolean uploaded = uploadFileToServer(toUpload, summary, uc);
// remove source file if file was splitted
if (uploaded && targetDirectory != null) {
if (uploaded && targetDirectory != null && !targetDirectory.equals(directory)) {
File toBackup = new File(targetDirectory, toUpload.getName());
if (toBackup.exists()) {
toBackup.delete();