|
|
|
@ -445,20 +445,7 @@ namespace ICSharpCode.AddInManager2.Model
@@ -445,20 +445,7 @@ namespace ICSharpCode.AddInManager2.Model
|
|
|
|
|
{ |
|
|
|
|
Directory.Delete(targetDir, true); |
|
|
|
|
} |
|
|
|
|
Directory.CreateDirectory(targetDir); |
|
|
|
|
var packageContentsFiles = Directory.EnumerateFiles(packageDirectory, "*.*", SearchOption.TopDirectoryOnly); |
|
|
|
|
if (packageContentsFiles != null) |
|
|
|
|
{ |
|
|
|
|
foreach (var file in packageContentsFiles) |
|
|
|
|
{ |
|
|
|
|
// Don't copy the .nupkg file
|
|
|
|
|
FileInfo fileInfo = new FileInfo(file); |
|
|
|
|
if (fileInfo.Extension != ".nupkg") |
|
|
|
|
{ |
|
|
|
|
File.Copy(file, Path.Combine(targetDir, fileInfo.Name)); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
DeepCopy(packageDirectory, targetDir); |
|
|
|
|
|
|
|
|
|
return true; |
|
|
|
|
} |
|
|
|
@ -467,6 +454,27 @@ namespace ICSharpCode.AddInManager2.Model
@@ -467,6 +454,27 @@ namespace ICSharpCode.AddInManager2.Model
|
|
|
|
|
return false; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void DeepCopy(string packageDirectory, string targetDirectory) |
|
|
|
|
{ |
|
|
|
|
Directory.CreateDirectory(targetDirectory); |
|
|
|
|
|
|
|
|
|
foreach (string file in Directory.EnumerateFiles(packageDirectory, "*.*", SearchOption.TopDirectoryOnly)) |
|
|
|
|
{ |
|
|
|
|
// Don't copy the .nupkg file
|
|
|
|
|
FileInfo fileInfo = new FileInfo(file); |
|
|
|
|
if (fileInfo.Extension != ".nupkg") |
|
|
|
|
{ |
|
|
|
|
File.Copy(file, Path.Combine(targetDirectory, fileInfo.Name)); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
foreach (string packageSubDirectory in Directory.EnumerateDirectories(packageDirectory)) |
|
|
|
|
{ |
|
|
|
|
string newTargetDirectory = Path.Combine(targetDirectory, Path.GetFileName(packageSubDirectory)); |
|
|
|
|
DeepCopy(packageSubDirectory, newTargetDirectory); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public void CancelUpdate(AddIn addIn) |
|
|
|
|
{ |
|
|
|
|