Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: KSP-CKAN/CKAN
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 3f438ffd830b
Choose a base ref
...
head repository: KSP-CKAN/CKAN
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 8077240e05f8
Choose a head ref
  • 2 commits
  • 3 files changed
  • 2 contributors

Commits on Oct 13, 2018

  1. Copy the full SHA
    72da29e View commit details
  2. Copy the full SHA
    8077240 View commit details
Showing with 13 additions and 4 deletions.
  1. +1 −0 CHANGELOG.md
  2. +0 −2 Core/KSPManager.cs
  3. +12 −2 Core/Net/NetFileCache.cs
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -18,6 +18,7 @@ All notable changes to this project will be documented in this file.
- [GUI] Handle exception for missing libcurl (#2531 by: HebaruSan; reviewed: politas)
- [Core] Catch illegal characters in ZIP exceptions (#2515 by: HebaruSan; reviewed: politas)
- [Netkan] Handle two-part KSP-AVC versions (#2532 by: HebaruSan; reviewed: politas)
- [Core] Stop auto-moving cached files (#2538 by: HebaruSan; reviewed: politas)

## v1.25.3 (Woomera)

2 changes: 0 additions & 2 deletions Core/KSPManager.cs
Original file line number Diff line number Diff line change
@@ -337,12 +337,10 @@ public bool TrySetupCache(string path, out string failureReason)
{
Win32Registry.DownloadCacheDir = "";
Cache = new NetModuleCache(this, Win32Registry.DownloadCacheDir);
Cache.MoveFrom(origPath);
}
else
{
Cache = new NetModuleCache(this, path);
Cache.MoveFrom(origPath);
Win32Registry.DownloadCacheDir = path;
}
failureReason = null;
14 changes: 12 additions & 2 deletions Core/Net/NetFileCache.cs
Original file line number Diff line number Diff line change
@@ -464,8 +464,18 @@ public void MoveFrom(string fromDir)
string toFile = Path.Combine(cachePath, Path.GetFileName(fromFile));
if (File.Exists(toFile))
{
// Don't need multiple copies of the same file
File.Delete(fromFile);
if (File.GetCreationTime(fromFile) == File.GetCreationTime(toFile))
{
// Same filename with same timestamp, almost certainly the same
// actual file on disk via different paths thanks to symlinks.
// Skip this whole folder!
break;
}
else
{
// Don't need multiple copies of the same file
File.Delete(fromFile);
}
}
else
{