Skip to content

Commit 56d1f44

Browse files
author
winjo
committed
fix: submodule as folder
1 parent 0def4f1 commit 56d1f44

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

packages/git/src/file-system/GitRemote.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -264,10 +264,11 @@ export default class GitRemote extends BaseFileSystem implements FileSystem {
264264
cb(new ApiError(ErrorCode.EINVAL, e.message));
265265
}
266266
entryList?.forEach((item) => {
267+
// TODO: submodule type 为 commit,当做文件夹处理,是否需要更好的提示方式,antcode 中为外链
267268
const node =
268-
item.type === 'tree'
269-
? new DirInode()
270-
: new FileInode(new Stats(FileType.FILE, -1, +item.mode));
269+
item.type === 'blob'
270+
? new FileInode(new Stats(FileType.FILE, -1, +item.mode))
271+
: new DirInode();
271272
let p = item.path;
272273
if (p[0] !== '/') {
273274
p = `/${p}`;

0 commit comments

Comments
 (0)