Skip to content

Commit 2ee54f5

Browse files
authored
Merge pull request #2770 from lexarchik/i2755
fix for #2755
2 parents 9f4ee1b + b998dbe commit 2ee54f5

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

‎src/Paket.Core/Dependencies/NuGet.fs‎

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -634,6 +634,14 @@ let DownloadAndExtractPackage(alternativeProjectRoot, root, isLocalOverride:bool
634634
let targetFile = FileInfo targetFileName
635635
let licenseFileName = getLicenseFile packageName version
636636

637+
if force then
638+
match configResolved.Path with
639+
| Some p ->
640+
if verbose then
641+
verbosefn "Cleaning %s" p
642+
CleanDir p
643+
| _ -> ()
644+
637645
let rec getFromCache (caches:Cache list) =
638646
match caches with
639647
| cache::rest ->
@@ -673,7 +681,7 @@ let DownloadAndExtractPackage(alternativeProjectRoot, root, isLocalOverride:bool
673681
use _ = Profile.startCategory Profile.Category.FileIO
674682
let parent = Path.GetDirectoryName targetFileName
675683
if not (Directory.Exists parent) then Directory.CreateDirectory parent |> ignore
676-
File.Copy(nupkg.FullName,targetFileName)
684+
File.Copy(nupkg.FullName,targetFileName,true)
677685
| _ ->
678686
// discover the link on the fly
679687
let downloadUrl = ref ""

0 commit comments

Comments
 (0)