hfs 0.52.0-beta4 → 0.52.0-beta6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -3
- package/admin/assets/index-4CQRk-yB.css +1 -0
- package/admin/assets/index-sqjqhfQh.js +810 -0
- package/admin/assets/{sha512-3tDoWWX4.js → sha512-t1dU12Dj.js} +1 -1
- package/admin/index.html +2 -2
- package/frontend/assets/index-fqsRmx7w.css +1 -0
- package/frontend/assets/index-w_Bu3TcZ.js +101 -0
- package/frontend/assets/{sha512-I2H28VIm.js → sha512-U8GKU-vd.js} +1 -1
- package/frontend/index.html +2 -3
- package/package.json +3 -3
- package/src/acme.js +29 -12
- package/src/adminApis.js +3 -3
- package/src/api.get_file_list.js +2 -1
- package/src/api.monitor.js +3 -1
- package/src/api.net.js +3 -1
- package/src/api.vfs.js +6 -1
- package/src/apiMiddleware.js +1 -1
- package/src/block.js +1 -1
- package/src/connections.js +3 -1
- package/src/const.js +2 -2
- package/src/cross.js +16 -4
- package/src/geo.js +1 -1
- package/src/index.js +1 -1
- package/src/langs/hfs-lang-fi.json +37 -5
- package/src/langs/hfs-lang-it.json +6 -2
- package/src/langs/hfs-lang-nl.json +20 -3
- package/src/langs/hfs-lang-ru.json +21 -3
- package/src/langs/hfs-lang-vi.json +68 -22
- package/src/langs/hfs-lang-zh.json +13 -5
- package/src/listen.js +4 -3
- package/src/log.js +11 -2
- package/src/middlewares.js +2 -2
- package/src/misc.js +2 -1
- package/src/roots.js +1 -1
- package/src/selfCheck.js +4 -5
- package/src/serveGuiAndSharedFiles.js +6 -6
- package/src/serveGuiFiles.js +56 -43
- package/src/update.js +5 -4
- package/src/upload.js +5 -4
- package/src/util-files.js +1 -1
- package/src/util-os.js +53 -15
- package/src/vfs.js +9 -5
- package/admin/assets/index-gtPWo_px.js +0 -809
- package/admin/assets/index-oSvCg3xb.css +0 -1
- package/frontend/assets/index-Kys6yJtN.css +0 -1
- package/frontend/assets/index-SY22o0dA.js +0 -101
- package/plugins/download-counter/storage/counters.yaml +0 -663
package/src/vfs.js
CHANGED
|
@@ -47,10 +47,13 @@ function inheritFromParent(parent, child) {
|
|
|
47
47
|
return child;
|
|
48
48
|
}
|
|
49
49
|
function isSameFilenameAs(name) {
|
|
50
|
-
const
|
|
51
|
-
return (other) =>
|
|
50
|
+
const normalized = normalizeFilename(name);
|
|
51
|
+
return (other) => normalized === normalizeFilename(typeof other === 'string' ? other : getNodeName(other));
|
|
52
52
|
}
|
|
53
53
|
exports.isSameFilenameAs = isSameFilenameAs;
|
|
54
|
+
function normalizeFilename(x) {
|
|
55
|
+
return const_1.IS_WINDOWS || const_1.IS_MAC ? x.toLocaleLowerCase() : x;
|
|
56
|
+
}
|
|
54
57
|
async function applyParentToChild(child, parent, name) {
|
|
55
58
|
var _a, _b;
|
|
56
59
|
const ret = {
|
|
@@ -216,7 +219,7 @@ async function* walkNode(parent, { ctx, depth = Infinity, prefixPath = '', requi
|
|
|
216
219
|
continue;
|
|
217
220
|
const nodeName = getNodeName(child);
|
|
218
221
|
const name = prefixPath + nodeName;
|
|
219
|
-
took === null || took === void 0 ? void 0 : took.add(name);
|
|
222
|
+
took === null || took === void 0 ? void 0 : took.add(normalizeFilename(name));
|
|
220
223
|
const item = { ...child, name };
|
|
221
224
|
if (!canSee(item))
|
|
222
225
|
continue;
|
|
@@ -249,7 +252,7 @@ async function* walkNode(parent, { ctx, depth = Infinity, prefixPath = '', requi
|
|
|
249
252
|
if (ctx === null || ctx === void 0 ? void 0 : ctx.req.aborted)
|
|
250
253
|
return;
|
|
251
254
|
const name = prefixPath + (((_a = parent.rename) === null || _a === void 0 ? void 0 : _a[path]) || path);
|
|
252
|
-
if (took === null || took === void 0 ? void 0 : took.has(name))
|
|
255
|
+
if (took === null || took === void 0 ? void 0 : took.has(normalizeFilename(name)))
|
|
253
256
|
continue;
|
|
254
257
|
if (depth) {
|
|
255
258
|
const dir = (0, path_1.dirname)(name);
|
|
@@ -288,8 +291,9 @@ function masksCouldGivePermission(masks, perm) {
|
|
|
288
291
|
}
|
|
289
292
|
exports.masksCouldGivePermission = masksCouldGivePermission;
|
|
290
293
|
function parentMaskApplier(parent) {
|
|
291
|
-
const matchers = (0, misc_1.onlyTruthy)(
|
|
294
|
+
const matchers = (0, misc_1.onlyTruthy)(lodash_1.default.map(parent.masks, (v, k) => {
|
|
292
295
|
k = k.startsWith('**/') ? k.slice(3) : !k.includes('/') ? k : ''; // ** globstar matches also zero subfolders, so this mask must be applied here too
|
|
296
|
+
const { maskOnly, ...mods } = v || {};
|
|
293
297
|
// k is stored into the object for debugging purposes
|
|
294
298
|
return k && { k, mods, matcher: (0, misc_1.makeMatcher)(k), mustBeFolder: maskOnly && (maskOnly === 'folders') };
|
|
295
299
|
}));
|