From b998dbed50cd61a9aea025f0b95c02b5dfcc34a4 Mon Sep 17 00:00:00 2001 From: Lysogorskiy Aleksey Date: Sat, 16 Sep 2017 23:25:35 +0300 Subject: [PATCH] fix for #2755 --- src/Paket.Core/Dependencies/NuGet.fs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/Paket.Core/Dependencies/NuGet.fs b/src/Paket.Core/Dependencies/NuGet.fs index 83359b7a01..1c43daa5c4 100644 --- a/src/Paket.Core/Dependencies/NuGet.fs +++ b/src/Paket.Core/Dependencies/NuGet.fs @@ -631,6 +631,14 @@ let DownloadAndExtractPackage(alternativeProjectRoot, root, isLocalOverride:bool let targetFile = FileInfo targetFileName let licenseFileName = getLicenseFile packageName version + if force then + match configResolved.Path with + | Some p -> + if verbose then + verbosefn "Cleaning %s" p + CleanDir p + | _ -> () + let rec getFromCache (caches:Cache list) = match caches with | cache::rest -> @@ -670,7 +678,7 @@ let DownloadAndExtractPackage(alternativeProjectRoot, root, isLocalOverride:bool use _ = Profile.startCategory Profile.Category.FileIO let parent = Path.GetDirectoryName targetFileName if not (Directory.Exists parent) then Directory.CreateDirectory parent |> ignore - File.Copy(nupkg.FullName,targetFileName) + File.Copy(nupkg.FullName,targetFileName,true) | _ -> // discover the link on the fly let downloadUrl = ref ""