Skip to content

Commit

Permalink
fix: replace existing files in sync
Browse files Browse the repository at this point in the history
  • Loading branch information
thetric committed Jan 16, 2017
1 parent 6d537a4 commit b309f75
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import io.reactivex.functions.Consumer

import java.nio.file.Files
import java.nio.file.Path
import java.nio.file.StandardCopyOption
import java.nio.file.attribute.FileTime
import java.time.LocalDateTime
import java.time.ZoneId
Expand Down Expand Up @@ -81,7 +82,7 @@ class SyncingIliasItemVisitor {
.subscribe(new Consumer<InputStream>() {
@Override
void accept(InputStream inputStream) throws Exception {
Files.copy(inputStream, path)
Files.copy(inputStream, path, StandardCopyOption.REPLACE_EXISTING)
Files.setLastModifiedTime(path, toFileTime(file.modified))
}
})
Expand Down

0 comments on commit b309f75

Please sign in to comment.