Skip to content
This repository was archived by the owner on Mar 14, 2025. It is now read-only.

Commit 5d5eb05

Browse files
slightly more efficient (don't perform propfind request when replace is true)
1 parent 5288086 commit 5d5eb05

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/java/org/cryptomator/cloudaccess/webdav/WebDavClient.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ private InputStream read(final Request.Builder getRequest, final ProgressListene
187187
}
188188

189189
CloudItemMetadata write(final Path file, final boolean replace, final InputStream data, final ProgressListener progressListener) throws CloudProviderException {
190-
if (exists(file) && !replace) {
190+
if (!replace && exists(file)) {
191191
throw new AlreadyExistsException("CloudNode already exists and replace is false");
192192
}
193193

0 commit comments

Comments
 (0)