Skip to content

Commit fd79e5b

Browse files
committed
Merge branch 'bugfix'
# Conflicts: # RELEASE_NOTES.md # src/LockFileComparer/AssemblyInfo.fs # src/Paket.Bootstrapper/Properties/AssemblyInfo.cs # src/Paket.Core/AssemblyInfo.fs # src/Paket/AssemblyInfo.fs
2 parents 4961429 + 3a20e7a commit fd79e5b

File tree

2 files changed

+21
-4
lines changed

2 files changed

+21
-4
lines changed

RELEASE_NOTES.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
1-
#### 6.0.0-alpha003 - 2019-12-03
1+
#### 6.0.0-alpha004 - 2019-12-04
22
* Full .NET Core / SDK compatible version
33

4+
#### 5.240.0 - 2019-12-04
5+
* WORKAROUND: Microsoft pushed couple of invalid zips to nuget.org this works around it - https://github.com/fsprojects/Paket/issues/3743
6+
47
#### 5.239.0 - 2019-12-03
58
* PaketUpdate failed with semver 2.0 version and jfrog hosted repository - https://github.com/fsprojects/Paket/issues/3601
69

src/Paket.Core/Dependencies/NuGetCache.fs

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -533,9 +533,23 @@ let ExtractPackage(fileName:string, targetFolder, packageName:PackageName, versi
533533
ZipFile.ExtractToDirectory(fileName, targetFolder)
534534
with
535535
| exn ->
536-
let text = if detailed then sprintf "%s In rare cases a firewall might have blocked the download. Please look into the file and see if it contains text with further information." Environment.NewLine else ""
537-
let path = try Path.GetFullPath fileName with :? PathTooLongException -> sprintf "%s (!too long!)" fileName
538-
raise (Exception(sprintf "Error during extraction of %s.%s%s" path Environment.NewLine text, exn))
536+
try
537+
traceWarnfn "Package couldn't be extracted to %s. Message: %s. Trying to extract files individually." targetFolder exn.Message
538+
use archive = ZipFile.OpenRead fileName
539+
for entry in archive.Entries do
540+
let destinationPath = Path.GetFullPath(Path.Combine(targetFolder, entry.FullName))
541+
let fi = FileInfo(destinationPath)
542+
if not fi.Directory.Exists then
543+
fi.Directory.Create()
544+
if fi.Exists then
545+
try fi.Delete() with | _ -> ()
546+
547+
entry.ExtractToFile(destinationPath)
548+
with
549+
| exn ->
550+
let text = if detailed then sprintf "%s In rare cases a firewall might have blocked the download. Please look into the file and see if it contains text with further information." Environment.NewLine else ""
551+
let path = try Path.GetFullPath fileName with :? PathTooLongException -> sprintf "%s (!too long!)" fileName
552+
raise (Exception(sprintf "Error during extraction of %s.%s%s" path Environment.NewLine text, exn))
539553

540554
cleanup directory
541555
if verbose then

0 commit comments

Comments
 (0)