Skip to content

Commit af3c8af

Browse files
committed
Read attributes from server when missing in status response. Timestamps set on server may differ in precision and only be set to seconds instead of milliseconds.
1 parent e9924a1 commit af3c8af

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

core/src/main/java/ch/cyberduck/core/worker/WriteTimestampWorker.java

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
import ch.cyberduck.core.Session;
2525
import ch.cyberduck.core.UserDateFormatterFactory;
2626
import ch.cyberduck.core.exception.BackgroundException;
27+
import ch.cyberduck.core.features.AttributesFinder;
2728
import ch.cyberduck.core.features.Timestamp;
2829
import ch.cyberduck.core.transfer.TransferStatus;
2930

@@ -59,15 +60,10 @@ public Boolean run(final Session<?> session) throws BackgroundException {
5960
.setLockId(this.getLockId(file));
6061
feature.setTimestamp(file, status);
6162
if(!PathAttributes.EMPTY.equals(status.getResponse())) {
62-
file.withAttributes(status.getResponse());
63+
file.setAttributes(status.getResponse());
6364
}
6465
else {
65-
if(created != null) {
66-
file.attributes().setCreationDate(created);
67-
}
68-
if(modified != null) {
69-
file.attributes().setModificationDate(modified);
70-
}
66+
file.setAttributes(session.getFeature(AttributesFinder.class).find(file));
7167
}
7268
return true;
7369
}

0 commit comments

Comments
 (0)