`CopyOnWriteLinkSupportedBetweenPaths` throws for a source on a mapped network drive
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 78/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- csharp
- Ambito
- operating-systems
Direzione di ricerca
Inizia da WindowsCopyOnWriteFilesystem.cs, in particolare da CopyOnWriteLinkSupportedBetweenPaths, e leggi VolumeInfoCache.cs intorno a GetVolumeForPath. Riproduci la chiamata con un file su un’unità Q: mappata; il lavoro è completato quando il metodo restituisce false invece di generare un’eccezione quando non esiste alcun volume noto.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
The XML documentation of ICopyOnWriteFilesystem.CopyOnWriteLinkSupportedBetweenPaths says:
Determines whether a copy-on-write link can be created between the provided paths.
Returns: True if a link can be created, false if it cannot.
A mapped network drive does not support a link. The expected result is therefore false, not an exception. However, the method throws:
System.ArgumentException: No known volume information for 'Q:\share\big-installer.zip'. If the drive was added recently you may need to recreate the filesystem cache.
at Microsoft.CopyOnWrite.Windows.VolumeInfoCache.GetVolumeForPath(String path) in D:\CoW\lib\Windows\VolumeInfoCache.cs:line 102
at Microsoft.CopyOnWrite.Windows.WindowsCopyOnWriteFilesystem.CopyOnWriteLinkSupportedBetweenPaths(String source, String destination, Boolean pathsAreFullyResolved) in D:\CoW\lib\Windows\WindowsCopyOnWriteFilesystem.cs:line 46
Q: is a mapped network drive. VolumeInfoCache holds the local volumes only, so GetVolumeForPath finds no volume for the path and throws.
Steps to reproduce
- Map a network share to a drive letter, for example
Q:. - Put a file on that share.
- Call
CopyOnWriteLinkSupportedBetweenPathswith the file onQ:as the source.
Result: the call throws ArgumentException.
Expected: the call returns false.
Suggested fix
Return false for a path with no known volume, in the same way that the volume enumeration ignores a volume that gives an error. The release history shows this pattern for other volume errors:
- 0.3.7: ignore
ACCESS_DENIEDon volume enumeration. - 0.3.9 to 0.3.12: ignore
FILE_NOT_FOUND,ERROR_NO_SUCH_DEVICE, and
ERROR_DEV_NOT_EXISTon volume enumeration. - 0.4.2: ignore any volume that gives an error.
A mapped network drive is arguably the next case in this series.
Version
CopyOnWrite0.5.0 (NuGet)- .NET 8, Windows 11
- Lingua principale
- C#
- Stelle
- 153
- Fork
- 9
- Merge medio
- 10g 21h
- PR unite (30g)
- 2
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 microsoft/CopyOnWrite
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 20/100
microsoft/CopyOnWrite#24 · 15 commenti ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
microsoft/CopyOnWrite#19 ·
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 20/100
microsoft/CopyOnWrite#7 ·
Tutte le issue di microsoft/CopyOnWrite
Issue simili
-
type/automation type/tech-debt
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
-
t/bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
-
ci-failure-cause test-failure
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
-
area:auth FE mvp P3
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
klasolsson81/jobbliggaren#1788 ·