Progmasoft Git

tazel

A build system for C, C++, Objective-C, Objective-C++ and Zig, with C# project files.

Clonegit clone https://git.progmasoft.com/tazel

refactor(cli): follow the Entry.Location rename in the Trash GC

The GC and its test helper used Trash.Entry.Directory, renamed to Location
on the base branch (#59). Behavior is unchanged.

Verification: Release build with warnings as errors (0 errors); full suite
763 passed, 1 skipped.
Commit
301daa9fe66d828d456afa0619bdcef6135ac0ec
Author
Leitwolf11 ·
Parents
0306cca47e1c

Files · Download .tar.gz

Changes

 src/Progmasoft.Tazel/Project/Trash.cs      | 4 ++--
 tests/Progmasoft.Tazel.Tests/TrashTests.cs | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/Progmasoft.Tazel/Project/Trash.cs b/src/Progmasoft.Tazel/Project/Trash.cs
index aee9fc6..4df0d61 100644
--- a/src/Progmasoft.Tazel/Project/Trash.cs
+++ b/src/Progmasoft.Tazel/Project/Trash.cs
@@ -219,8 +219,8 @@ public static class Trash
 
             foreach (var entry in removed)
             {
-                Directory.Delete(entry.Directory, recursive: true);
-                File.Delete(InfoPath(entry.Directory));
+                Directory.Delete(entry.Location, recursive: true);
+                File.Delete(InfoPath(entry.Location));
             }
 
             // Written through the locked handle itself, which also moves the file's time to now: no second handle,
diff --git a/tests/Progmasoft.Tazel.Tests/TrashTests.cs b/tests/Progmasoft.Tazel.Tests/TrashTests.cs
index 642a70f..b90fcc2 100644
--- a/tests/Progmasoft.Tazel.Tests/TrashTests.cs
+++ b/tests/Progmasoft.Tazel.Tests/TrashTests.cs
@@ -175,7 +175,7 @@ public sealed class TrashTests : IDisposable
 
     private void Age(Trash.Entry entry, TimeSpan by)
     {
-        var info = entry.Directory + Trash.InfoSuffix;
+        var info = entry.Location + Trash.InfoSuffix;
         var record = System.Text.Json.Nodes.JsonNode.Parse(File.ReadAllText(info))!;
         record["MovedAt"] = entry.MovedAt - by;
         File.WriteAllText(info, record.ToJsonString());