Skip to content

Commit

Permalink
Fix implementation to report for share only.
Browse files Browse the repository at this point in the history
  • Loading branch information
dkocher committed Mar 8, 2024
1 parent f8b4b03 commit 984971a
Showing 1 changed file with 1 addition and 13 deletions.
14 changes: 1 addition & 13 deletions smb/src/main/java/ch/cyberduck/core/smb/SMBQuotaFeature.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,6 @@
* GNU General Public License for more details.
*/

import ch.cyberduck.core.DisabledListProgressListener;
import ch.cyberduck.core.ListService;
import ch.cyberduck.core.Path;
import ch.cyberduck.core.PathAttributes;
import ch.cyberduck.core.exception.BackgroundException;
import ch.cyberduck.core.features.Quota;
import ch.cyberduck.core.shared.DefaultHomeFinderService;
Expand All @@ -33,14 +29,6 @@ public SMBQuotaFeature(final SMBSession session) {

@Override
public Space get() throws BackgroundException {
long used = 0L;
long available = 0L;
for(Path container : session.getFeature(ListService.class).list(
new DefaultHomeFinderService(session).find(), new DisabledListProgressListener())) {
final PathAttributes attr = new SMBAttributesFinderFeature(session).find(container);
used += attr.getQuota().used;
available += attr.getQuota().available;
}
return new Quota.Space(used, available);
return new SMBAttributesFinderFeature(session).find(new DefaultHomeFinderService(session).find()).getQuota();
}
}

0 comments on commit 984971a

Please sign in to comment.