microsoft / microsoft/VFSForGit

Downloads directory is not deleted after running `gvfs upgrade` and subsequent non-elevated `gvfs upgrade` commands report an error

Open
#833 0 comments 0 reactions 1 assignee View on GitHub

@jamill is already working on this.

Since Feb 22, 2019.

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

Description

  1. Upgrade VFS4G via gvfs upgrade --confirm
  2. Open a non-elevated CMD prompt and run gvfs upgrade
  3. The follow error is logged and reported via telemetry:

[2019-02-22 13:38:23 -08:00] Error {"ErrorMessage":"DeleteAllInstallerDownloads: Could not remove directory: C:\ProgramData\GVFS\GVFS.Upgrade\Downloads.System.ArgumentException: Access to the path is denied.\r\n at System.IO.FileSystemInfo.set_Attributes(FileAttributes value)\r\n at GVFS.Common.FileSystem.PhysicalFileSystem.RecursiveDelete(String path)\r\n at GVFS.Common.ProductUpgraderInfo.DeleteAllInstallerDownloads()"}

Two issues here:

  • The downloads directory should have been deleted after the upgrade
  • gvfs upgrade should not report an error if DeleteAllInstallerDownloads fails when running non-elevated (in fact it should probably not try to delete the directory at all).

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.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.