Skip to content

Suggested fix for the ltfs_ordered_copy single file special case issue. - #599

Merged
rangelmx merged 1 commit into
LinearTapeFileSystem:release/v2.4.9.0from
hugo-hur:fix-single-file-copy-keep-tree
Jul 29, 2026
Merged

Suggested fix for the ltfs_ordered_copy single file special case issue.#599
rangelmx merged 1 commit into
LinearTapeFileSystem:release/v2.4.9.0from
hugo-hur:fix-single-file-copy-keep-tree

Conversation

@hugo-hur

@hugo-hur hugo-hur commented Jun 9, 2026

Copy link
Copy Markdown

Summary of changes

This pull request includes following changes or fixes.

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • My changes generate no new warnings
  • I have confirmed my fix is effective or that my feature works

… above the special case, so len(args.keep_tree) no longer hits None
@vandelvan
vandelvan changed the base branch from main to release/v2.4.9.0 July 3, 2026 20:29

@XV02 XV02 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great finding, thanks! LGTM

@alexzc117 alexzc117 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good for me! Thanks for your effort!

@rangelmx
rangelmx merged commit ba1695e into LinearTapeFileSystem:release/v2.4.9.0 Jul 29, 2026
7 checks passed
hugo-hur added a commit to hugo-hur/ltfs that referenced this pull request Aug 6, 2026
Resolve the conflict in src/utils/ltfs_ordered_copy by re-applying the --move
feature on top of the target's refactored copy path (the progress-based
_run_copy/copyfileobj from LinearTapeFileSystem#586 and the single-file fix from LinearTapeFileSystem#599).

The move now performs its post-copy source removal after _run_copy (so it also
gets the progress bar), threads the move flag through CopyItem/walk_dir, and
keeps the scoped directory pruning and the directory-metadata snapshot pass.
LinearTapeFileSystem#599's keep_tree/single-file fix now comes from the target, so it is no longer
carried on this branch. Verified on local disk: recursive move prunes the source
and preserves directory mode/mtime; a non-recursive directory is left untouched.
@hugo-hur
hugo-hur deleted the fix-single-file-copy-keep-tree branch August 6, 2026 19:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants