Error when changing directory case sensitivity on windows (double check mac / linux as well)
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 45/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- typescript
- Lĩnh vực
- devtools, operating-systems
Hướng nghiên cứu
Start by tracing the rename flow in compositeFileSystemAdapter.ts:282-289 and IDEContext.tsx:293, then inspect the FileSystemAccessAPIFileSystem.ts cache and pathUtils.ts. Reproduce a case-only folder rename with files on Windows, and check macOS/Linux as requested. Done means the rename preserves all files and avoids self-copy behavior across the listed platforms.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Silent Data Loss: Files Deleted When Renaming Folder with Case Changes on Windows
Problem
When renaming a folder by only changing the case (e.g., myfolder → MyFolder), all files inside are silently deleted on Windows. The browser UI shows success, but checking the local filesystem reveals all files are gone.
⚠️ CRITICAL: This causes permanent data loss.
Steps to Reproduce
- Create a folder (e.g.,
testfolder) with files inside - Right-click the folder in the file explorer
- Rename by changing case only (e.g.,
testfolder→TestFolder) - Operation appears successful in browser
- Check local filesystem - files are deleted
Root Cause
JavaScript uses case-sensitive path comparisons, but Windows filesystem is case-insensitive:
if (oldPath === newPath)returns false for/myfoldervs/MyFolder- Current rename operation: create → copy → delete
- On Windows, both paths point to the same directory
- Results in directory self-copy, corrupting/deleting files
Affected code: compositeFileSystemAdapter.ts:282-289, IDEContext.tsx:293, FileSystemAccessAPIFileSystem.ts cache
Expected Behavior
Folder rename should preserve all files, regardless of case changes, on all platforms (Windows/macOS/Linux).
Proposed Fix
Two-step rename using temporary intermediate name:
/myfolder → /myfolder_temp_12345 → /MyFolder
This prevents self-copy and maintains data integrity.
Affected Components
- Composite File System (
FileSystemAccessAPIFileSystem.ts) - File system adapter (
compositeFileSystemAdapter.ts) - IDE Context (
IDEContext.tsx) - Path utilities (
pathUtils.ts)
- Ngôn ngữ chính
- TypeScript
- Star
- 1
- Fork
- 0
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không 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 jcollard/LuaInTheWeb
-
tech-debt
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
jcollard/LuaInTheWeb#752 ·
-
tech-debt
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 68/100
jcollard/LuaInTheWeb#690 ·
-
tech-debt
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 75/100
jcollard/LuaInTheWeb#590 ·
-
tech-debt
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
jcollard/LuaInTheWeb#518 ·
-
enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
jcollard/LuaInTheWeb#235 ·
Tất cả issue của jcollard/LuaInTheWeb
Issue tương tự
-
[BUG] rag: sentence content can cross the reported sentence boundariesCó thể đã có người làm @LJK-ikun đã nhận hôm nay. Đang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/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 70/100
Maintainer thường phản hồi trong vòng 1 ngày
-
README: the Resource URI Schemas example's file://documents/* pattern only matches that literal URIĐang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
platformatic/mcp#361 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
frontend
Độ 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
-
Push: sem service worker ou sem VAPID, o interruptor de Notificações fica ligado sem avisar nadaĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
melgarafael/DeskcommCRM#3164 ·
Maintainer thường phản hồi trong vòng 1 ngày