Skip to content

Commit e9924a1

Browse files
committed
Comment.
1 parent 167927f commit e9924a1

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

webdav/src/main/java/ch/cyberduck/core/dav/DAVTimestampFeature.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ public DAVTimestampFeature(final DAVSession session) {
6969
public void setTimestamp(final Path file, final TransferStatus status) throws BackgroundException {
7070
try {
7171
if(null != status.getModified()) {
72+
// Obtain latest properties from server to save server modification date in custom property
7273
final DavResource resource = this.getResource(file);
7374
session.getClient().patch(new DAVPathEncoder().encode(file), this.getCustomProperties(resource, status.getModified()), Collections.emptyList(),
7475
this.getCustomHeaders(file, status));
@@ -106,7 +107,7 @@ protected DavResource getResource(final Path file) throws BackgroundException, I
106107
protected List<Element> getCustomProperties(final DavResource resource, final Long modified) {
107108
final List<Element> props = new ArrayList<>();
108109
if(resource.getModified() != null) {
109-
Element element = SardineUtil.createElement(LAST_MODIFIED_SERVER_CUSTOM_NAMESPACE);
110+
final Element element = SardineUtil.createElement(LAST_MODIFIED_SERVER_CUSTOM_NAMESPACE);
110111
element.setTextContent(new RFC1123DateFormatter().format(resource.getModified(), TimeZone.getTimeZone("UTC")));
111112
props.add(element);
112113
}

0 commit comments

Comments
 (0)