Skip to content

Commit 5b22e22

Browse files
thomhurstclaude
andauthored
fix: Address PR review feedback for backward compatibility (#1693)
- Change Clean() default to removeReadOnlyAttribute: false for backward compat - Move CopyTo log to start of method for consistency with other operations - Add XML remarks documenting the backward-compatible behavior 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 17c05c4 commit 5b22e22

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

src/ModularPipelines/FileSystem/Folder.cs

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,9 +95,13 @@ public void Delete()
9595
/// <summary>
9696
/// Removes all files and subdirectories within the folder.
9797
/// </summary>
98+
/// <remarks>
99+
/// This method preserves backward compatibility by not removing read-only attributes.
100+
/// Use <see cref="Clean(bool)"/> with <c>removeReadOnlyAttribute: true</c> to handle read-only files.
101+
/// </remarks>
98102
public void Clean()
99103
{
100-
Clean(removeReadOnlyAttribute: true);
104+
Clean(removeReadOnlyAttribute: false);
101105
}
102106

103107
/// <summary>
@@ -153,6 +157,8 @@ public Folder CopyTo(string targetPath)
153157
/// <returns>A new <see cref="Folder"/> instance representing the copied folder.</returns>
154158
public Folder CopyTo(string targetPath, bool preserveTimestamps)
155159
{
160+
LogFolderOperationWithDestination("Copying Folder: {Source} > {Destination} [Module: {ModuleName}, Activity: {ActivityId}]", this, targetPath);
161+
156162
Directory.CreateDirectory(targetPath);
157163

158164
// Copy all subdirectories first
@@ -206,8 +212,6 @@ public Folder CopyTo(string targetPath, bool preserveTimestamps)
206212
targetRootDir.LastAccessTimeUtc = DirectoryInfo.LastAccessTimeUtc;
207213
}
208214

209-
LogFolderOperationWithDestination("Copied Folder: {Source} > {Destination} [Module: {ModuleName}, Activity: {ActivityId}]", this, targetPath);
210-
211215
return new Folder(targetPath);
212216
}
213217

0 commit comments

Comments
 (0)