diff options
author | daniel oeh <daniel.oeh@gmail.com> | 2014-12-28 14:11:36 +0100 |
---|---|---|
committer | daniel oeh <daniel.oeh@gmail.com> | 2014-12-28 14:11:36 +0100 |
commit | c33081b909a800aeae138a9ded37f4358e36b66c (patch) | |
tree | 204b2d88e69da60ab8450163cb03d1c5ad5c5636 /core/src/main/java | |
parent | 60dcf4865a9b8af519b7e1f2b6ec2c3d9f27490f (diff) | |
download | AntennaPod-c33081b909a800aeae138a9ded37f4358e36b66c.zip |
Fixed file name generator
fixes #580
Diffstat (limited to 'core/src/main/java')
-rw-r--r-- | core/src/main/java/de/danoeh/antennapod/core/storage/DownloadRequester.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/core/src/main/java/de/danoeh/antennapod/core/storage/DownloadRequester.java b/core/src/main/java/de/danoeh/antennapod/core/storage/DownloadRequester.java index f5ee9e28c..2b191c401 100644 --- a/core/src/main/java/de/danoeh/antennapod/core/storage/DownloadRequester.java +++ b/core/src/main/java/de/danoeh/antennapod/core/storage/DownloadRequester.java @@ -92,8 +92,9 @@ public class DownloadRequester { private void download(Context context, FeedFile item, FeedFile container, File dest, boolean overwriteIfExists, String username, String password, boolean deleteOnFailure, Bundle arguments) { + final boolean partiallyDownloadedFileExists = item.getFile_url() != null; if (!isDownloadingFile(item)) { - if (!isFilenameAvailable(dest.toString()) || (deleteOnFailure && dest.exists())) { + if (!isFilenameAvailable(dest.toString()) || (!partiallyDownloadedFileExists && dest.exists())) { if (BuildConfig.DEBUG) Log.d(TAG, "Filename already used."); if (isFilenameAvailable(dest.toString()) && overwriteIfExists) { |