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 @@ -104,20 +104,20 @@ public void testFolderContent() throws IOException {
assertTrue(new UploadFileRemoteOperation(getDummyFile("chunkedFile.txt").getAbsolutePath(),
"/1/1/chunkedFile.txt",
"text/plain",
String.valueOf(System.currentTimeMillis() / 1000))
System.currentTimeMillis() / 1000)
.execute(client).isSuccess());

assertTrue(new UploadFileRemoteOperation(getDummyFile("chunkedFile.txt").getAbsolutePath(),
"/1/1/chunkedFile2.txt",
"text/plain",
String.valueOf(System.currentTimeMillis() / 1000))
System.currentTimeMillis() / 1000)
.execute(client).isSuccess());

File imageFile = getFile("imageFile.png");
assertTrue(new UploadFileRemoteOperation(imageFile.getAbsolutePath(),
"/1/1/imageFile.png",
"image/png",
String.valueOf(System.currentTimeMillis() / 1000))
System.currentTimeMillis() / 1000)
.execute(client).isSuccess());

// sync
Expand Down Expand Up @@ -166,7 +166,7 @@ public void testPhotoSearch() throws IOException {
assertTrue(new UploadFileRemoteOperation(imageFile.getAbsolutePath(),
remotePath,
"image/png",
String.valueOf(System.currentTimeMillis() / 1000))
System.currentTimeMillis() / 1000)
.execute(client).isSuccess());

assertNull(sut.getFileByDecryptedRemotePath(remotePath));
Expand Down Expand Up @@ -240,7 +240,7 @@ public void testGallerySearch() throws IOException {
assertTrue(new UploadFileRemoteOperation(imageFile.getAbsolutePath(),
imagePath,
"image/png",
String.valueOf((System.currentTimeMillis() - 10000) / 1000))
(System.currentTimeMillis() - 10000) / 1000)
.execute(client).isSuccess());

// Check that file does not yet exist in local database
Expand All @@ -251,7 +251,7 @@ public void testGallerySearch() throws IOException {
assertTrue(new UploadFileRemoteOperation(videoFile.getAbsolutePath(),
videoPath,
"video/mpeg",
String.valueOf((System.currentTimeMillis() + 10000) / 1000))
(System.currentTimeMillis() + 10000) / 1000)
.execute(client).isSuccess());

// Check that file does not yet exist in local database
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -495,7 +495,7 @@ private RemoteOperationResult encryptedUpload(OwnCloudClient client, OCFile pare
}

// Get the last modification date of the file from the file system
String lastModifiedTimestamp = Long.toString(originalFile.lastModified() / 1000);
long lastModifiedTimestamp = originalFile.lastModified() / 1000;

Long creationTimestamp = FileUtil.getCreationTimestamp(originalFile);

Expand Down Expand Up @@ -759,7 +759,7 @@ private RemoteOperationResult normalUpload(OwnCloudClient client) {
}

// Get the last modification date of the file from the file system
String lastModifiedTimestamp = Long.toString(originalFile.lastModified() / 1000);
long lastModifiedTimestamp = originalFile.lastModified() / 1000;

final Long creationTimestamp = FileUtil.getCreationTimestamp(originalFile);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -564,7 +564,7 @@ private String createFile(Document targetFolder, String displayName, String mime
newFilePath,
mimeType,
"",
String.valueOf(System.currentTimeMillis() / 1000),
System.currentTimeMillis() / 1000,
FileUtil.getCreationTimestamp(emptyFile),
false)
.execute(client);
Expand Down