Skip to content

Commit d6780c1

Browse files
committed
rimport: Delete unused safe_mvandlink().
1 parent 19c0be8 commit d6780c1

1 file changed

Lines changed: 0 additions & 11 deletions

File tree

rimport

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -143,17 +143,6 @@ def ensure_running_as(target_user: str, argv: list[str]) -> None:
143143
os.execvp("sudo", ["sudo", "-u", target_user, "--"] + argv)
144144

145145

146-
# TODO: Unused; delete.
147-
def safe_mvandlink(src: Path, dst: Path) -> None:
148-
dst.parent.mkdir(parents=True, exist_ok=True)
149-
# Move (handles cross-filesystem with copy2+remove under the hood)
150-
# This preserves metadata similarly to copy2 when crossing devices.
151-
moved_to = Path(shutil.move(str(src), str(final_dst)))
152-
# Create the symlink at the original src path
153-
link_target = str(moved_to)
154-
os.symlink(link_target, src)
155-
156-
157146
def get_staging_root() -> Path:
158147
"""Return the staging root. Uses $RIMPORT_STAGING if set, otherwise
159148
creates a sibling directory named '<inputdata_root>.staging'."""

0 commit comments

Comments
 (0)