Project

General

Profile

Actions

Bug #17800

closed

arv-put --no-follow-links issues

Added by Lucas Di Pentima over 3 years ago. Updated over 3 years ago.

Status:
Resolved
Priority:
Normal
Assigned To:
Category:
SDKs
Target version:
Story points:
-
Release relationship:
Auto

Description

A customer reported an incorrect behavior on the arv-put command when used with --no-follow-links:

$ arv-put --no-follow-links /path/to/some-dir/

and

$ arv-put --no-follow-links /path/to/some-dir/*

Should produce the same collection, but if /path/to/some-dir/ has some symbolic links inside, the second execution will not ignore them.


Subtasks 1 (0 open1 closed)

Task #17806: Review 17800-arvput-no-follow-linksResolvedLucas Di Pentima06/14/2021Actions
Actions #1

Updated by Lucas Di Pentima over 3 years ago

  • Status changed from New to In Progress
Actions #2

Updated by Lucas Di Pentima over 3 years ago

Updates at 96dc323b0 - branch 17800-arvput-no-follow-links
Test run: developer-run-tests: #2521

  • Fixes reported bug by ignoring symlinks (when requested) early in the upload list building process.
  • Updates test.
Actions #3

Updated by Tom Clegg over 3 years ago

Code LGTM.

Which behavior is "correct" seems debatable: it might be surprising that "arv-put --no-follow-symlinks foo" just creates an empty collection if foo itself is a symlink.

Perhaps worth adding something to the --help message to clarify?

-Do not follow file and directory symlinks.                                                                                                                       
+Do not follow file and directory symlinks. Even paths given explicitly on the command line will be skipped if they are symlinks.                                                                                                                       
Actions #4

Updated by Lucas Di Pentima over 3 years ago

Updates at 43e30e4be
Test run: developer-run-tests: #2525

  • Improves --help documentation following the above suggestion.
  • Logs warning when skipping a path that was specified by the user.
  • Logs a warning when skipping saving an empty new collection.
  • Adds test.
Actions #5

Updated by Tom Clegg over 3 years ago

LGTM, thanks!

Actions #6

Updated by Lucas Di Pentima over 3 years ago

  • % Done changed from 0 to 100
  • Status changed from In Progress to Resolved
Actions

Also available in: Atom PDF