fixed downloading of deleted files
This commit is contained in:
parent
001ffba420
commit
3ca7e0c55a
2 changed files with 3 additions and 3 deletions
|
@ -380,9 +380,9 @@ public class HttpDownloadConnection implements Transferable {
|
|||
connection.setUseCaches(false);
|
||||
connection.setRequestProperty("User-Agent", mXmppConnectionService.getIqGenerator().getUserAgent());
|
||||
connection.setRequestProperty("Accept-Encoding", "identity");
|
||||
final boolean tryResume = file.exists() && file.getKey() == null && file.getSize() > 0;
|
||||
final long expected = file.getExpectedSize();
|
||||
final boolean tryResume = file.exists() && file.getKey() == null && file.getSize() > 0 && file.getSize() < expected;
|
||||
long resumeSize = 0;
|
||||
long expected = file.getExpectedSize();
|
||||
if (tryResume) {
|
||||
resumeSize = file.getSize();
|
||||
Log.d(Config.LOGTAG, "http download trying resume after" + resumeSize + " of " + expected);
|
||||
|
|
|
@ -1670,7 +1670,7 @@ public class ConversationFragment extends XmppFragment implements EditMessage.Ke
|
|||
Log.d(Config.LOGTAG, "type: " + transferable.getClass().getName());
|
||||
Toast.makeText(getActivity(), R.string.not_connected_try_again, Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
} else if (message.treatAsDownloadable()) {
|
||||
} else if (message.treatAsDownloadable() || message.hasFileOnRemoteHost()) {
|
||||
createNewConnection(message);
|
||||
}
|
||||
}
|
||||
|
|
Reference in a new issue