Honor the requested mode in the Windows access provider
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 75/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- rust
- Ambito
- cli, operating-systems
Direzione di ricerca
Il problema si trova nel file std/sys/windows/fs.wave. Inizia leggendo la funzione access in quel file per vedere come attualmente ignora il parametro mode. Confronta con altre implementazioni di piattaforma per comprendere il comportamento atteso. Implementa i controlli della modalità utilizzando chiamate API di Windows (come GetFileAttributes per l'esistenza, e forse CreateFile con l'accesso desiderato per testare la leggibilità/scrittura). Scrivi test nello stesso file o in un modulo di test corrispondente per verificare i casi di esistenza (FS_F_OK), leggibile (FS_R_OK) e non scrivibile (FS_W_OK su un file di sola lettura). Assicurati che gli errori restituiscano i codici di errore portabili corretti.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Problem
std/sys/windows/fs.wave exposes FS_F_OK, FS_X_OK, FS_W_OK, and FS_R_OK, but access(path, mode) never reads mode. Any existing path therefore succeeds regardless of the requested access check, so a write check currently behaves the same as an existence check.
Other filesystem providers pass the requested mode through to their native access primitive, so the Windows provider does not preserve the portable contract.
Completion criteria
- Keep
FS_F_OKas an existence check. - Make nonzero access modes affect the Windows result instead of being ignored.
- Ensure a read-only file does not report writable for
FS_W_OK. - Define and test the Windows behavior for the exported
FS_R_OKandFS_X_OKmodes. - Return the existing portable negative error codes on failure.
- Add focused Windows regression coverage for existence, readable, and non-writable cases.
Difficulty: easy.
- Lingua principale
- Rust
- Stelle
- 53
- Fork
- 16
- Merge medio
- 3h 38m
- PR unite (30g)
- 48
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di wavefnd/Wave
-
enhancement good first issue needs testing
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
-
enhancement good first issue needs testing
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
-
bug ci good first issue needs testing
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
-
bug ci good first issue needs testing
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
-
bug good first issue needs testing
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
Tutte le issue di wavefnd/Wave
Issue simili
-
bug github_actions
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
registrystack/registry-stack#1393 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
longbridge/gpui-kit#3223 ·
-
bug engine
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
rocky-data/rocky#2181 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
oasisprotocol/oasis-sdk#2523 ·
-
[indexer] [QA] Add a focused test for the new NonRetryableError / assertSocketAlive() behavior. Apertabot:ai-assisted component:indexer QA-roadmap status:untriaged
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
midnightntwrk/midnight-indexer#1557 ·