boolean forceOverwrite = intent.getBooleanExtra(KEY_FORCE_OVERWRITE, false);
boolean isInstant = intent.getBooleanExtra(KEY_INSTANT_UPLOAD, false);
- int localAction = intent.getIntExtra(KEY_LOCAL_BEHAVIOUR, LOCAL_BEHAVIOUR_COPY);
+ int localAction = intent.getIntExtra(KEY_LOCAL_BEHAVIOUR, LOCAL_BEHAVIOUR_FORGET);
if (intent.hasExtra(KEY_FILE) && files == null) {
Log_OC.e(TAG, "Incorrect array for OCFiles provided in upload intent");
Pair<String, String> putResult = mPendingUploads.putIfAbsent(
account, files[i].getRemotePath(), newUpload
);
- uploadKey = putResult.first;
- requestedUploads.add(uploadKey);
+ if (putResult != null) {
+ uploadKey = putResult.first;
+ requestedUploads.add(uploadKey);
+ } // else, file already in the queue of uploads; don't repeat the request
}
} catch (IllegalArgumentException e) {