Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Error when changing directory case sensitivity on windows (double check mac / linux as well)

Đang mở
#563 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

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

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ả

bug

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

  1. Create a folder (e.g., testfolder) with files inside
  2. Right-click the folder in the file explorer
  3. Rename by changing case only (e.g., testfolder → TestFolder)
  4. Operation appears successful in browser
  5. 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 /myfolder vs /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

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. 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.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của jcollard/LuaInTheWeb

Tất cả issue của jcollard/LuaInTheWeb

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.