diff options
Diffstat (limited to 'dotup_cli/src/commands/link.rs')
| -rw-r--r-- | dotup_cli/src/commands/link.rs | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/dotup_cli/src/commands/link.rs b/dotup_cli/src/commands/link.rs index bed3744..614c0ca 100644 --- a/dotup_cli/src/commands/link.rs +++ b/dotup_cli/src/commands/link.rs | |||
| @@ -24,7 +24,13 @@ pub fn main(config: Config, opts: Opts) -> anyhow::Result<()> { | |||
| 24 | }; | 24 | }; |
| 25 | 25 | ||
| 26 | if let Some(destination) = destination { | 26 | if let Some(destination) = destination { |
| 27 | for path in collect_file_type(origins, FileType::File)? { | 27 | let collected_paths = if opts.directory { |
| 28 | origins.to_vec() | ||
| 29 | } else { | ||
| 30 | collect_file_type(origins, FileType::File)? | ||
| 31 | }; | ||
| 32 | |||
| 33 | for path in collected_paths { | ||
| 28 | let link_desc = LinkCreateParams { | 34 | let link_desc = LinkCreateParams { |
| 29 | origin: path, | 35 | origin: path, |
| 30 | destination: destination.clone(), | 36 | destination: destination.clone(), |
