mirror of
https://github.com/xpipe-io/xpipe.git
synced 2024-11-22 07:30:24 +00:00
bsd tar fixes
This commit is contained in:
parent
da1944ef3d
commit
6d0bb39786
1 changed files with 5 additions and 3 deletions
|
@ -272,9 +272,11 @@ public abstract class BaseCompressAction implements BrowserAction, BranchAction
|
||||||
var base = new FilePath(model.getCurrentDirectory().getPath());
|
var base = new FilePath(model.getCurrentDirectory().getPath());
|
||||||
|
|
||||||
if (directory) {
|
if (directory) {
|
||||||
var dir = new FilePath(entries.getFirst().getRawFileEntry().getPath()).toDirectory().toUnix();
|
var dir = new FilePath(entries.getFirst().getRawFileEntry().getPath());
|
||||||
var command = CommandBuilder.of().add("find").addFile(dir).add("|", "sed", "s,^" + dir + ",,", "|");
|
// Fix for bsd find, remove /
|
||||||
command.add(tar).add("-C").addFile(dir).add("-T", "-");
|
var command = CommandBuilder.of().add("find").addFile(dir.removeTrailingSlash().toUnix())
|
||||||
|
.add("|", "sed").addLiteral("s,^" + dir.toDirectory().toUnix() + "*,,").add("|");
|
||||||
|
command.add(tar).add("-C").addFile(dir.toDirectory().toUnix()).add("-T", "-");
|
||||||
model.runCommandAsync(command, true);
|
model.runCommandAsync(command, true);
|
||||||
} else {
|
} else {
|
||||||
var command = CommandBuilder.of().add(tar);
|
var command = CommandBuilder.of().add(tar);
|
||||||
|
|
Loading…
Reference in a new issue