Skip to content

Commit

Permalink
Update dependency.Revert "Return status from response when no propstat."
Browse files Browse the repository at this point in the history
This reverts commit 3fc4464.
  • Loading branch information
dkocher committed Jan 10, 2025
1 parent 3fc4464 commit b604719
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion webdav/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
<packaging>jar</packaging>

<properties>
<sardine-version>5.14</sardine-version>
<sardine-version>5.14.1</sardine-version>
<milton-api.version>4.0.5.2400</milton-api.version>
</properties>

Expand Down
3 changes: 3 additions & 0 deletions webdav/src/main/java/ch/cyberduck/core/dav/DAVClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,9 @@ public List<DavResource> propfind(final String url, final int depth, final Propf
@Override
public int getStatusCode() {
List<Propstat> list = response.getPropstat();
if(list.isEmpty()) {
return DEFAULT_STATUS_CODE;
}
for(Propstat propstat : list) {
if(propstat.getStatus() != null) {
try {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ public Space get() throws BackgroundException {
final Path home = new DefaultHomeFinderService(session).find();
try {
final DavQuota quota = session.getClient().getQuota(new DAVPathEncoder().encode(home));
if(null == quota) {
return Quota.unknown;
}
return new Space(
quota.getQuotaUsedBytes() > 0 ? quota.getQuotaUsedBytes() : 0,
quota.getQuotaAvailableBytes() >= 0 ? quota.getQuotaAvailableBytes() : Long.MAX_VALUE
Expand Down

0 comments on commit b604719

Please sign in to comment.