Skip to content

Cannot grab a single file #588

Description

@hiker

For MONC, it would be preferable to copy a single (source) file from the root directory (to avoid a long list of directories to exclude). Unfortunately, Fab cannot run grab_folder on a single file, since the underlying rsync command adds a / add the end of the source (to avoid creating an unnecessary directory layer).

Suggested approach:

  1. Only add / in rsync if the source is indeed a directory.
  2. Change the name from grab_folder to (e.g.) grab_files (or we could add a separate 'grab_file`, but that feels like unnecessary code duplication), to better indicate that this can be used for directories and file(s) . Backwards compatibility should be maintained (with a deprecation warning)

Metadata

Metadata

Labels

enhancementNew feature or requestin progressSomeone is actively working on this issue

Type

No type

Projects

Status
Complete

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions