Skip to content

Commit 6c911f1

Browse files
committed
7.2.10553
1 parent fa944b9 commit 6c911f1

File tree

48 files changed

+467
-175
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+467
-175
lines changed

Java/android/androidfsstorage/app/build.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ android {
3434
jarJar {
3535
rules = [
3636
'stax-api-1.0.1.jar' : 'javax.xml.** com.ithit.webdav.xml.@1',
37-
'webdav-server-7.2.10512.jar': 'javax.xml.stream.** com.ithit.webdav.xml.stream.@1'
37+
'webdav-server-7.2.10553.jar': 'javax.xml.stream.** com.ithit.webdav.xml.stream.@1'
3838
]
3939
}
4040

@@ -75,11 +75,11 @@ dependencies {
7575
implementation 'commons-io:commons-io:2.7'
7676
implementation 'com.google.code.gson:gson:2.8.9'
7777
implementation 'com.android.support:appcompat-v7:27.1.1'
78-
implementation('com.ithit.webdav.integration:android-integration:7.2.10512', {
78+
implementation('com.ithit.webdav.integration:android-integration:7.2.10553', {
7979
exclude group: 'org.nanohttpd', module: 'nanohttpd'
8080
})
8181
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
8282
jarJar 'stax:stax-api:1.0.1'
83-
jarJar 'com.ithit.webdav:webdav-server:7.2.10512'
83+
jarJar 'com.ithit.webdav:webdav-server:7.2.10553'
8484
testImplementation 'junit:junit:4.12'
8585
}

Java/jakarta/collectionsync/pom.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
<groupId>com.ithit.webdav.samples</groupId>
88
<artifactId>collectionsync-jakarta</artifactId>
9-
<version>7.2.10512</version>
9+
<version>7.2.10553</version>
1010
<packaging>war</packaging>
1111

1212
<properties>
@@ -25,7 +25,7 @@
2525
<dependency>
2626
<groupId>com.ithit.webdav.integration</groupId>
2727
<artifactId>jakarta-integration</artifactId>
28-
<version>7.2.10512</version>
28+
<version>7.2.10553</version>
2929
</dependency>
3030
<dependency>
3131
<groupId>commons-lang</groupId>
@@ -60,7 +60,7 @@
6060
<dependency>
6161
<groupId>com.ithit.webdav</groupId>
6262
<artifactId>webdav-server</artifactId>
63-
<version>7.2.10512</version>
63+
<version>7.2.10553</version>
6464
</dependency>
6565
</dependencies>
6666

@@ -132,7 +132,7 @@
132132
<server>filesystem</server>
133133
<port>11021</port>
134134
<path>/</path>
135-
<warSourceDirectory>target/collectionsync-jakarta-7.2.10512</warSourceDirectory>
135+
<warSourceDirectory>target/collectionsync-jakarta-7.2.10553</warSourceDirectory>
136136
</configuration>
137137
</plugin>
138138
<plugin>

Java/jakarta/collectionsync/src/main/java/com/ithit/webdav/samples/collectionsync/FileImpl.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,6 @@ public String getEtag() throws ServerException {
221221
* @param count Number of bytes to be written to the output stream.
222222
* @throws ServerException In case of an error.
223223
*/
224-
// <<<< readFileImpl
225224
@Override
226225
public void read(OutputStream out, long startIndex, long count) throws ServerException {
227226
Path fullPath = this.getFullPath();
@@ -242,7 +241,6 @@ public void read(OutputStream out, long startIndex, long count) throws ServerExc
242241
throw new ServerException(x);
243242
}
244243
}
245-
// readFileImpl >>>>
246244

247245
/**
248246
* Saves the content of the file from the specified stream to the File System repository.
@@ -256,7 +254,6 @@ public void read(OutputStream out, long startIndex, long count) throws ServerExc
256254
* @throws ServerException In case of an error.
257255
* @throws IOException I/O error.
258256
*/
259-
// <<<< writeFileImpl
260257
@Override
261258
public long write(InputStream content, String contentType, long startIndex, long totalFileLength)
262259
throws LockedException, ServerException, IOException {
@@ -295,7 +292,6 @@ public long write(InputStream content, String contentType, long startIndex, long
295292
getEngine().getWebSocketServer().notifyUpdated(getPath(), getWebSocketID());
296293
return totalWrittenBytes;
297294
}
298-
// writeFileImpl >>>>
299295

300296
private void incrementSerialNumber() {
301297
try {
@@ -413,6 +409,8 @@ public void moveTo(Folder folder, String destName) throws LockedException,
413409
if (ExtendedAttributesExtension.hasExtendedAttribute(newPath.toString(), activeLocksAttribute)) {
414410
ExtendedAttributesExtension.deleteExtendedAttribute(newPath.toString(), activeLocksAttribute);
415411
}
412+
this.newPath = newPath;
413+
incrementMetadataEtag();
416414
try {
417415
String currentPath = folder.getPath() + encode(destName);
418416
getEngine().getWebSocketServer().notifyMoved(getPath(), currentPath, getWebSocketID());

Java/jakarta/collectionsync/src/main/java/com/ithit/webdav/samples/collectionsync/FolderImpl.java

Lines changed: 4 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,6 @@ private static String fixPath(String path) {
9797
* @throws LockedException This folder was locked. Client did not provide the lock token.
9898
* @throws ServerException In case of an error.
9999
*/
100-
// <<<< createFileImpl
101100
@Override
102101
public FileImpl createFile(String name) throws LockedException, ServerException {
103102
ensureHasToken();
@@ -115,7 +114,6 @@ public FileImpl createFile(String name) throws LockedException, ServerException
115114
}
116115
return null;
117116
}
118-
// createFileImpl >>>>
119117

120118
/**
121119
* Creates new {@link FolderImpl} folder with the specified name in this folder.
@@ -125,7 +123,6 @@ public FileImpl createFile(String name) throws LockedException, ServerException
125123
* @throws LockedException This folder was locked. Client did not provide the lock token.
126124
* @throws ServerException In case of an error.
127125
*/
128-
// <<<< createFolderImpl
129126
@Override
130127
public Folder createFolder(String name) throws LockedException,
131128
ServerException {
@@ -147,7 +144,6 @@ private void createFolderInternal(String name) throws LockedException,
147144
}
148145
}
149146
}
150-
// createFolderImpl >>>>
151147

152148
private Path deleteIfHidden(String name) throws ServerException {
153149
Path fullPath = Paths.get(this.getFullPath().toString(), name);
@@ -171,7 +167,6 @@ private Path deleteIfHidden(String name) throws ServerException {
171167
* @return Instance of {@link PageResults} class that contains items on a requested page and total number of items in a folder.
172168
* @throws ServerException In case of an error.
173169
*/
174-
// <<<< getChildren
175170
@Override
176171
public PageResults getChildren(List<Property> propNames, Long offset, Long nResults, List<OrderProperty> orderProps) throws ServerException {
177172
String decodedPath = HierarchyItemImpl.decodeAndConvertToPath(getPath());
@@ -197,9 +192,7 @@ public PageResults getChildren(List<Property> propNames, Long offset, Long nResu
197192
}
198193
return new PageResults(children, total);
199194
}
200-
// getChildren >>>>
201195

202-
// <<<< deleteFolderImpl
203196
@Override
204197
public void delete() throws LockedException, MultistatusException,
205198
ServerException {
@@ -214,9 +207,7 @@ public void delete() throws LockedException, MultistatusException,
214207
}
215208
getEngine().getWebSocketServer().notifyDeleted(getPath(), getWebSocketID());
216209
}
217-
// deleteFolderImpl >>>>
218210

219-
// <<<< copyToFolderImpl
220211
@Override
221212
public void copyTo(Folder folder, String destName, boolean deep)
222213
throws LockedException, MultistatusException, ServerException {
@@ -241,7 +232,6 @@ public void copyTo(Folder folder, String destName, boolean deep)
241232
setName(destName);
242233
getEngine().getWebSocketServer().notifyCreated(folder.getPath() + encode(destName), getWebSocketID());
243234
}
244-
// copyToFolderImpl >>>>
245235

246236
/**
247237
* Check whether current folder is the parent to the destination.
@@ -316,7 +306,6 @@ private String getExtension(String name) {
316306

317307
}
318308

319-
// <<<< moveToFolderImpl
320309
@Override
321310
public void moveTo(Folder folder, String destName) throws LockedException,
322311
ConflictException, MultistatusException, ServerException {
@@ -329,15 +318,17 @@ public void moveTo(Folder folder, String destName) throws LockedException,
329318
Path destinationFullPath = Paths.get(destinationFolder, destName);
330319
try {
331320
removeIndex(getFullPath(), this);
332-
Files.move(sourcePath, destinationFullPath, StandardCopyOption.REPLACE_EXISTING);
321+
Files.deleteIfExists(destinationFullPath);
322+
Files.move(sourcePath, destinationFullPath);
333323
addIndex(destinationFullPath, folder.getPath() + destName, destName);
334324
} catch (IOException e) {
335325
throw new ServerException(e);
336326
}
337327
setName(destName);
328+
this.newPath = destinationFullPath;
329+
incrementMetadataEtag();
338330
getEngine().getWebSocketServer().notifyMoved(getPath(), folder.getPath() + encode(destName), getWebSocketID());
339331
}
340-
// moveToFolderImpl >>>>
341332

342333
/**
343334
* Returns list of items that correspond to search request.
@@ -349,7 +340,6 @@ public void moveTo(Folder folder, String destName) throws LockedException,
349340
* @param nResults The number of items to return.
350341
* @return Instance of {@link PageResults} class that contains items on a requested page and total number of items in search results.
351342
*/
352-
// <<<< searchImpl
353343
@Override
354344
public PageResults search(String searchString, SearchOptions options, List<Property> propNames, Long offset, Long nResults) {
355345
List<HierarchyItem> results = new LinkedList<>();
@@ -380,7 +370,6 @@ public PageResults search(String searchString, SearchOptions options, List<Prope
380370
}
381371
return new PageResults((offset != null && nResults != null) ? results.stream().skip(offset).limit(nResults).collect(Collectors.toList()) : results, (long) results.size());
382372
}
383-
// searchImpl >>>>
384373

385374
/**
386375
* Returns free bytes available to current user.

0 commit comments

Comments
 (0)