Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Refresh file metadata before using it
  • Loading branch information
yaakov-h committed Sep 19, 2019
commit 43413b2a41cc840861f9e2180d3a6886a8a22e2f
7 changes: 5 additions & 2 deletions src/Paket.Core/Installation/RestoreProcess.fs
Original file line number Diff line number Diff line change
Expand Up @@ -504,12 +504,15 @@ let createProjectReferencesFiles (lockFile:LockFile) (projectFile:ProjectFile) (
if File.Exists (referencesFile.FileName) then
// The existing cached file can be read-only if it was copied from a read-only file.
// For example, when using Team Foundation Version Control with Server workspaces.
if Utils.isWindows && paketCachedReferencesFileName.Exists && paketCachedReferencesFileName.IsReadOnly then
paketCachedReferencesFileName.IsReadOnly <- false
if Utils.isWindows then
paketCachedReferencesFileName.Refresh()
if paketCachedReferencesFileName.Exists && paketCachedReferencesFileName.IsReadOnly then
paketCachedReferencesFileName.IsReadOnly <- false

File.Copy(referencesFile.FileName, paketCachedReferencesFileName.FullName, true)

if Utils.isWindows then
paketCachedReferencesFileName.Refresh()
paketCachedReferencesFileName.IsReadOnly <- false
else
// it can happen that the references file doesn't exist if paket doesn't find one in that case we update the cache by deleting it.
Expand Down