File tree Expand file tree Collapse file tree 5 files changed +25
-18
lines changed
src/main/java/com/ithit/webdav/samples/fsstorageservlet/extendedattributes Expand file tree Collapse file tree 5 files changed +25
-18
lines changed Original file line number Diff line number Diff line change 66
77 <groupId >com.ithit.webdav.samples</groupId >
88 <artifactId >deltav</artifactId >
9- <version >4.2.2799 </version >
9+ <version >4.2.2812 </version >
1010 <packaging >war</packaging >
1111
1212 <properties >
2323 <dependency >
2424 <groupId >com.ithit.webdav.integration</groupId >
2525 <artifactId >servlet-integration</artifactId >
26- <version >4.2.2799 </version >
26+ <version >4.2.2812 </version >
2727 </dependency >
2828 <dependency >
2929 <groupId >commons-dbcp</groupId >
125125 <dependency >
126126 <groupId >com.ithit.webdav</groupId >
127127 <artifactId >webdav-server</artifactId >
128- <version >4.2.2799 </version >
128+ <version >4.2.2812 </version >
129129 </dependency >
130130
131131 <dependency >
165165 <goal >copy-resources</goal >
166166 </goals >
167167 <configuration >
168- <outputDirectory >${project.build.directory} /deltav-4.2.2799 /META-INF</outputDirectory >
168+ <outputDirectory >${project.build.directory} /deltav-4.2.2812 /META-INF</outputDirectory >
169169 <overwrite >true</overwrite >
170170 <resources >
171171 <resource >
244244 <server >filesystem</server >
245245 <port >11021</port >
246246 <path >/</path >
247- <warSourceDirectory >target/deltav-4.2.2799 </warSourceDirectory >
247+ <warSourceDirectory >target/deltav-4.2.2812 </warSourceDirectory >
248248 </configuration >
249249 </plugin >
250250 <plugin >
Original file line number Diff line number Diff line change 66
77 <groupId >com.ithit.webdav.samples</groupId >
88 <artifactId >filesystemstorage</artifactId >
9- <version >4.2.2799 </version >
9+ <version >4.2.2812 </version >
1010 <packaging >war</packaging >
1111
1212 <properties >
3434 <dependency >
3535 <groupId >com.ithit.webdav.integration</groupId >
3636 <artifactId >servlet-integration</artifactId >
37- <version >4.2.2799 </version >
37+ <version >4.2.2812 </version >
3838 </dependency >
3939 <dependency >
4040 <groupId >commons-io</groupId >
142142 <dependency >
143143 <groupId >com.ithit.webdav</groupId >
144144 <artifactId >webdav-server</artifactId >
145- <version >4.2.2799 </version >
145+ <version >4.2.2812 </version >
146146 </dependency >
147147 <dependency >
148148 <groupId >net.java.dev.jna</groupId >
228228 <server >filesystem</server >
229229 <port >11021</port >
230230 <path >/</path >
231- <warSourceDirectory >target/filesystemstorage-4.2.2799 </warSourceDirectory >
231+ <warSourceDirectory >target/filesystemstorage-4.2.2812 </warSourceDirectory >
232232 </configuration >
233233 </plugin >
234234 <plugin >
Original file line number Diff line number Diff line change 44import java .nio .ByteBuffer ;
55import java .nio .charset .Charset ;
66import java .nio .file .*;
7+ import java .nio .file .attribute .FileTime ;
78import java .nio .file .attribute .UserDefinedFileAttributeView ;
89import java .util .List ;
910
@@ -18,9 +19,15 @@ class DefaultExtendedAttribute implements ExtendedAttribute {
1819 */
1920 @ Override
2021 public void setExtendedAttribute (String path , String attribName , String attribValue ) throws IOException {
22+ FileTime lastWriteTime = Files .getLastModifiedTime (Paths .get (path ), LinkOption .NOFOLLOW_LINKS );
23+
2124 UserDefinedFileAttributeView view = Files
2225 .getFileAttributeView (Paths .get (path ), UserDefinedFileAttributeView .class );
2326 view .write (attribName , Charset .defaultCharset ().encode (attribValue ));
27+
28+ // File modification date should not change when locking and unlocking. Otherwise client application may think that the file was changed.
29+ // Preserve last modification date.
30+ Files .setLastModifiedTime (Paths .get (path ), lastWriteTime );
2431 }
2532
2633 /**
Original file line number Diff line number Diff line change 66
77 <groupId >com.ithit.webdav.samples</groupId >
88 <artifactId >oraclestorage</artifactId >
9- <version >4.2.2799 </version >
9+ <version >4.2.2812 </version >
1010 <packaging >war</packaging >
1111
1212 <properties >
2323 <dependency >
2424 <groupId >com.ithit.webdav.integration</groupId >
2525 <artifactId >servlet-integration</artifactId >
26- <version >4.2.2799 </version >
26+ <version >4.2.2812 </version >
2727 </dependency >
2828 <dependency >
2929 <groupId >commons-dbcp</groupId >
125125 <dependency >
126126 <groupId >com.ithit.webdav</groupId >
127127 <artifactId >webdav-server</artifactId >
128- <version >4.2.2799 </version >
128+ <version >4.2.2812 </version >
129129 </dependency >
130130
131131 <dependency >
165165 <goal >copy-resources</goal >
166166 </goals >
167167 <configuration >
168- <outputDirectory >${project.build.directory} /oraclestorage-4.2.2799 /META-INF</outputDirectory >
168+ <outputDirectory >${project.build.directory} /oraclestorage-4.2.2812 /META-INF</outputDirectory >
169169 <overwrite >true</overwrite >
170170 <resources >
171171 <resource >
244244 <server >filesystem</server >
245245 <port >11021</port >
246246 <path >/</path >
247- <warSourceDirectory >target/oraclestorage-4.2.2799 </warSourceDirectory >
247+ <warSourceDirectory >target/oraclestorage-4.2.2812 </warSourceDirectory >
248248 </configuration >
249249 </plugin >
250250 <plugin >
Original file line number Diff line number Diff line change 66
77 <groupId >com.ithit.webdav.samples</groupId >
88 <artifactId >kotlinfs</artifactId >
9- <version >4.2.2799 </version >
9+ <version >4.2.2812 </version >
1010 <packaging >war</packaging >
1111
1212 <properties >
3434 <dependency >
3535 <groupId >com.ithit.webdav.integration</groupId >
3636 <artifactId >servlet-integration</artifactId >
37- <version >4.2.2799 </version >
37+ <version >4.2.2812 </version >
3838 </dependency >
3939 <dependency >
4040 <groupId >commons-io</groupId >
142142 <dependency >
143143 <groupId >com.ithit.webdav</groupId >
144144 <artifactId >webdav-server</artifactId >
145- <version >4.2.2799 </version >
145+ <version >4.2.2812 </version >
146146 </dependency >
147147 <dependency >
148148 <groupId >net.java.dev.jna</groupId >
240240 <server >filesystem</server >
241241 <port >11021</port >
242242 <path >/</path >
243- <warSourceDirectory >target/kotlinfs-4.2.2799 </warSourceDirectory >
243+ <warSourceDirectory >target/kotlinfs-4.2.2812 </warSourceDirectory >
244244 </configuration >
245245 </plugin >
246246 <plugin >
You can’t perform that action at this time.
0 commit comments