Skip to content

Commit faeaa4d

Browse files
authored
fix: bug about multiple folders could not be mounted in Edge (#144)
* fix: issuse about bottom address * fix(fs): 使用Promise.all修复挂载句柄的重复检查 * chore: bump version --------- Co-authored-by: huang yao <5945154+kirakiray@users.noreply.github.com>
1 parent 469b54f commit faeaa4d

File tree

6 files changed

+89
-66
lines changed

6 files changed

+89
-66
lines changed

dist/hashes.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

dist/packages.zip

100 Bytes
Binary file not shown.

package-lock.json

Lines changed: 70 additions & 62 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "noneos",
3-
"version": "3.2.13",
3+
"version": "3.2.14",
44
"description": "A browser-based operating system",
55
"type": "module",
66
"scripts": {

packages/apps/file-manager.napp/comps/bottom-address.html

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,19 @@
7171
const e = pathArr[index];
7272
pathStr += `${e}/`;
7373

74+
// 挂载模式
75+
if (e.startsWith("$mount-")) {
76+
// 挂载模式
77+
const [mark, reRootName] = e.split(">");
78+
79+
arr.push({
80+
name: reRootName,
81+
kind: "folder-local",
82+
path: e,
83+
});
84+
continue;
85+
}
86+
7487
if (index === 0) {
7588
if (e.includes(":")) {
7689
// 协议模式
@@ -89,7 +102,7 @@
89102
remoteRoot: 1,
90103
});
91104

92-
// 挂载模式
105+
// 远程文件的挂载模式
93106
if (rootName.startsWith("$mount-")) {
94107
// 挂载模式
95108
const [mark, reRootName] = rootName.split(">");

packages/fs/handle/mount/db.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,9 @@ export const saveHandle = async (handle) => {
3131
id = `${handle.kind}-${Date.now()}`;
3232
const allHandles = await getAllHandles();
3333

34-
const isSame = allHandles.some((item) => item.handle.isSameEntry(handle));
34+
const isSame = await Promise.all(
35+
allHandles.map((item) => item.handle.isSameEntry(handle))
36+
).then((results) => results.some(Boolean));
3537
if (isSame) {
3638
// 已经挂载过了
3739
return;

0 commit comments

Comments
 (0)