Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Deprecated

## [1.2.0] - 2025-08-18

### Changed

- Add option in `local_get()` in `Remote_utils.pm` to allow symbolic links instead of copies

## [1.1.0] - 2025-04-15

### Added
Expand Down
15 changes: 11 additions & 4 deletions Remote_utils.pm
Original file line number Diff line number Diff line change
Expand Up @@ -2409,16 +2409,23 @@ sub local_get{
( $remote_id, $remote_machine, $remote_file ) = @_[0..2];
}

if ($options{"preserve"}) {
$cmd = "cp -p $remote_file $local_file";
if ($options{"links"}) {
$cmd = "ln -s $remote_file $local_file";
print "cmd = $cmd\n";
system($cmd);
$retcode = $? >> 8;
if ($retcode) { $cp_ok = 0 }
else { $cp_ok = 1 }
} elsif ($options{"preserve"}) {
$cmd = "cp -p $remote_file $local_file";
print "cmd = $cmd\n";
system($cmd);
$retcode = $? >> 8;
if ($retcode) { $cp_ok = 0 }
else { $cp_ok = 1 }
} else {
print "cmd = copy( $remote_file, $local_file )\n";
$cp_ok = copy( $remote_file, $local_file );
print "cmd = copy( $remote_file, $local_file )\n";
$cp_ok = copy( $remote_file, $local_file );
}

return( $cp_ok );
Expand Down