Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ protected RemoteOperationResult run(OwnCloudClient client) {
String originUri = uploadFolderUri + "/.file";

moveMethod = new MoveMethod(originUri, destinationUri, true);
moveMethod.addRequestHeader(OC_X_OC_MTIME_HEADER, String.valueOf(file.lastModified() / 1000));
moveMethod.addRequestHeader(OC_X_OC_MTIME_HEADER, lastModificationTimestamp);

if (creationTimestamp != null && creationTimestamp > 0) {
moveMethod.addRequestHeader(OC_X_OC_CTIME_HEADER, String.valueOf(creationTimestamp));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,10 @@ public class UploadFileRemoteOperation extends RemoteOperation<String> {
protected String localPath;
protected String remotePath;
protected String mimeType;
private String lastModificationTimestamp;
/**
* Must be in seconds, according to UNIX time
*/
protected String lastModificationTimestamp;
protected Long creationTimestamp = null;
protected boolean disableRetries = false;
PutMethod putMethod = null;
Expand Down