Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

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

Aperta
#563 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
45/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
typescript

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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)
Lingua principale
TypeScript
Stelle
1
Fork
0
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di jcollard/LuaInTheWeb

Tutte le issue di jcollard/LuaInTheWeb

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.