[Bug] Windows repository cloning fails while creating an existing drive root
Maintainer thường phản hồi trong vòng 1 ngày
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 73/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- electron, node.js, typescript
Hướng nghiên cứu
Đọc apps/server/src/sourceControl/SourceControlRepositoryService.ts, đặc biệt là prepareDestination ở các dòng 221–247. Tái hiện lỗi trên Windows với một đích mới nằm ngay dưới thư mục gốc của ổ đĩa hiện có và kiểm tra cách bước chuẩn bị thư mục cha xử lý thư mục gốc đó. Hoàn tất khi đích được chuẩn bị và quá trình nhân bản tiếp tục mà không gặp lỗi EPERM.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
What happened
T3 Code's desktop app on Windows could not clone https://github.com/xMrAfonso/comark-loops. The user reported: "For some reason it doesn't clone projects from my github."
Diagnosis
The latest failed attempt stops in destination preparation, before Git starts cloning. The server attempts a recursive directory creation at the drive root, and Windows returns EPERM: operation not permitted, mkdir 'C:\'.
In SourceControlRepositoryService.prepareDestination, a destination that does not exist causes an unconditional fileSystem.makeDirectory(path.dirname(normalizedDestination), { recursive: true }). For a new folder directly under C:\, its parent is the existing drive root. The code does not first check whether that parent already exists.
Source inspected: https://github.com/pingdotgg/t3code/blob/4f63275ac7885281d245022e65f1e9e8816b1382/apps/server/src/sourceControl/SourceControlRepositoryService.ts#L221-L247
The same failure occurred three times in the local trace. Git access to the repository was verified independently, and a manual clone into a nested directory succeeded. This supports a destination-preparation failure for these attempts, rather than a repository access failure.
A possible fix is to avoid creating an already-existing parent directory, including a Windows drive root. This has not been implemented or tested during triage.
Steps to reproduce
The following minimal reproduction is inferred from the trace and source, and has not been independently repeated in the UI. The original destination input was not captured.
- Run the Windows desktop app.
- Open Add project and choose to clone a GitHub repository.
- Use
https://github.com/xMrAfonso/comark-loops. - Choose a new destination directly under the drive root, for example
C:\comark-loops. - Start the clone.
Expected: the repository is cloned into the new destination.
Observed in the user's trace: preparation fails while attempting mkdir 'C:\', before Git clone runs. The client receives the generic message: Source control repository operation cloneRepository failed for unknown: The source control operation could not be completed.
Version
- Desktop renderer reports:
0.0.46-nightly.20261010.2935. - Separately invoked triage CLI:
0.0.46-nightly.20261010.2948(npx t3@nightly triage). - Diagnosis source checkout: tag
v0.0.46-nightly.20261010.2948, commit4f63275ac7885281d245022e65f1e9e8816b1382; the destination-preparation code above is still present there.
Environment
Windows x64, version 10.0.26200; Node v26.8.2 in the triage context. Electron desktop app with a running local backend.
Evidence
Relevant server trace entries (UTC), with filesystem and provider wrappers summarized and personal paths omitted:
2026-10-10T17:51:19.915Z SourceControlRepositoryService.prepareDestination: Failure
2026-10-10T17:51:29.714Z SourceControlRepositoryService.prepareDestination: Failure
2026-10-10T21:40:08.524Z SourceControlRepositoryService.prepareDestination: Failure
PlatformError: Unknown: FileSystem.makeDirectory (C:\)
[cause]: Error: EPERM: operation not permitted, mkdir 'C:\'
Failure propagates through:
SourceControlRepositoryService.prepareClone
ProjectCloneTracker.start
ws.rpc.projectClone.start
Independent Git check:
git ls-remote https://github.com/xMrAfonso/comark-loops.git HEAD
b8f501e40534e81d4026b28d686a7b9f2ac1173b HEAD
Related issues
No matching issue was found in searches for clone failures involving Windows, EPERM, mkdir, or prepareDestination. This report concerns preparation of the clone destination before Git executes.
Fix applied or workaround
Ran:
git clone https://github.com/xMrAfonso/comark-loops.git C:\Central\VSC\comark-loops
The clone succeeded, with a clean checkout tracking origin/master at b8f501e40534e81d4026b28d686a7b9f2ac1173b. The user was instructed to add that checkout through Add project -> Local folder; that UI step has not been verified. No T3 source, configuration, or database was modified.
Filed by
Codex (GPT-6.1 Sol) via T3 Code triage.
- Ngôn ngữ chính
- TypeScript
- Star
- 24.8k
- Fork
- 6.4k
- Merge trung bình
- 2 giờ 48 phút
- Pull request đã merge (30 ngày)
- 353
Chuẩn bị môi trường
Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của pingdotgg/t3code
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Diff line counts use Indian numeral grouping on en_IN locale (inconsistent toLocaleString calls)Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
[Bug]: Private GitHub images in chat messages show "Image unavailable" (PR panel loads them)Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày
-
bug needs-triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của pingdotgg/t3code
Issue tương tự
-
category::task code priority::normal
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
e0ipso/strikethroo#145 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 85/100
cocos/cocos-docs#3333 ·
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
RevenueCat/react-native-purchases#2079 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
RevenueCat/purchases-hybrid-common#2039 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
agent-reported area/react bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
Maintainer thường phản hồi trong vòng 1 ngày