Skip to content

Commit

Permalink
Add choose of the folder option
Browse files Browse the repository at this point in the history
  • Loading branch information
galushko committed Mar 1, 2024
1 parent 79e4ad2 commit 2a9b5b9
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

import java.util.List;
import java.util.UUID;
import java.util.stream.Collectors;

@Slf4j
public class MoveToDestinationFolder extends CliCommandExecutor {
Expand All @@ -25,7 +26,12 @@ protected String[] getScript(SmartJson rabbitMessage) {
folderPath = Constants.FOLDERS.get("");
}

String file = String.valueOf(arguments.get(1)).replaceAll("\\s+", "\\\\ ");
String file = arguments.stream().
skip(1).
map(Object::toString).
collect(Collectors.joining("_")).
replaceAll("\\s+", "\\\\ ");

return new String[]{
"mv",
"-f",
Expand Down

0 comments on commit 2a9b5b9

Please sign in to comment.