microsoft / microsoft/VFSForGit

'gvfs sparse' dumps exception to console if '-f' is passed a file that does not exist

Open
#1,595 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

domain: sparse pri3
Dominant language
C#
Stars
6.1k
Forks
474
Avg merge
2d 4h
Merged PRs (30d)
8

Description

Unhandled Exception: System.IO.FileNotFoundException: Could not find file 'M:\testSparse\L#Dirs1.txt'.
   at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
   at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
   at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
   at System.IO.StreamReader..ctor(String path, Encoding encoding, Boolean detectEncodingFromByteOrderMarks, Int32 bufferSize, Boolean checkHost)
   at System.IO.File.InternalReadAllText(String path, Encoding encoding, Boolean checkHost)
   at GVFS.CommandLine.SparseVerb.Execute(GVFSEnlistment enlistment) in C:\Repos\VFSForGit\src\GVFS\GVFS\CommandLine\SparseVerb.cs:line 154
   at GVFS.Program.<>c.<Main>b__0_4(GVFSVerb verb) in C:\Repos\VFSForGit\src\GVFS\GVFS\Program.cs:line 101
   at CommandLine.ParserResultExtensions.WithParsed[T](ParserResult`1 result, Action`1 action)
   at GVFS.Program.Main(String[] args) in C:\Repos\VFSForGit\src\GVFS\GVFS\Program.cs:line 58

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at src/GVFS/GVFS/CommandLine/SparseVerb.cs line 154, where the stack trace shows the missing file is read, and inspect how the sparse command handles invalid input. Check the command entry point in src/GVFS/GVFS/Program.cs if needed. Done means a nonexistent file passed with -f no longer produces an unhandled exception dumped to the console.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
cli
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.