Skip to content

Commit 889ed4a

Browse files
committed
Comment on the implementation
1 parent 0b02130 commit 889ed4a

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

lib/utils.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -293,6 +293,11 @@ async function overQuota (root, serverUri) {
293293
if (quota === Infinity) {
294294
return false
295295
}
296+
// IMPORTANT NOTE: The following will traverse the directory to find
297+
// the actual file size of the files in the file system. This is a
298+
// costly operation, but neglible for the small quotas we currently
299+
// allow. If the quotas grow bigger, this will significantly reduce
300+
// write performance, and so it needs to be rewritten.
296301
var actualSize = await _asyncGetSize(root)
297302
return (actualSize > quota)
298303
}

0 commit comments

Comments
 (0)