mirror of
https://github.com/xpipe-io/xpipe.git
synced 2026-05-29 16:11:03 +00:00
Shell exit fixes
This commit is contained in:
@@ -268,7 +268,7 @@ public class BrowserComp extends SimpleComp {
|
||||
PlatformThread.sync(model.getBusy())));
|
||||
|
||||
tab.setGraphic(label);
|
||||
new FancyTooltipAugment<>(new SimpleStringProperty(model.getId() != null ? model.getId().toString() : null)).augment(label);
|
||||
new FancyTooltipAugment<>(new SimpleStringProperty(model.getTooltip())).augment(label);
|
||||
GrowAugment.create(true, false).augment(new SimpleCompStructure<>(label));
|
||||
tab.setContent(new OpenFileSystemComp(model).createSimple());
|
||||
tab.setText(model.getName());
|
||||
|
||||
@@ -9,7 +9,6 @@ import io.xpipe.app.util.ThreadHelper;
|
||||
import io.xpipe.core.impl.FileNames;
|
||||
import io.xpipe.core.process.ShellControl;
|
||||
import io.xpipe.core.process.ShellDialects;
|
||||
import io.xpipe.core.source.DataStoreId;
|
||||
import io.xpipe.core.store.*;
|
||||
import javafx.beans.binding.Bindings;
|
||||
import javafx.beans.property.*;
|
||||
@@ -40,14 +39,15 @@ public final class OpenFileSystemModel {
|
||||
private final Property<ModalOverlayComp.OverlayContent> overlay = new SimpleObjectProperty<>();
|
||||
private final BooleanProperty inOverview = new SimpleBooleanProperty();
|
||||
private final String name;
|
||||
private final DataStoreId id;
|
||||
private final String tooltip;
|
||||
private boolean local;
|
||||
|
||||
public OpenFileSystemModel(String name, BrowserModel browserModel, FileSystemStore store) {
|
||||
this.browserModel = browserModel;
|
||||
this.store = store;
|
||||
this.name = name != null ? name : DataStorage.get().getStoreEntry(store).getName();
|
||||
this.id = name != null ? null : DataStorage.get().getId(DataStorage.get().getStoreEntry(store));
|
||||
var e = DataStorage.get().getStoreEntryIfPresent(store);
|
||||
this.name = name != null ? name : e.isPresent() ? e.get().getName() : "?";
|
||||
this.tooltip = e.isPresent() ? DataStorage.get().getId(e.get()).toString() : name;
|
||||
this.inOverview.bind(Bindings.createBooleanBinding(
|
||||
() -> {
|
||||
return currentPath.get() == null;
|
||||
|
||||
@@ -33,12 +33,12 @@ import static io.xpipe.beacon.BeaconConfig.BODY_SEPARATOR;
|
||||
public class BeaconClient implements AutoCloseable {
|
||||
|
||||
@Getter
|
||||
private final Closeable base;
|
||||
private final AutoCloseable base;
|
||||
|
||||
private final InputStream in;
|
||||
private final OutputStream out;
|
||||
|
||||
private BeaconClient(Closeable base, InputStream in, OutputStream out) {
|
||||
private BeaconClient(AutoCloseable base, InputStream in, OutputStream out) {
|
||||
this.base = base;
|
||||
this.in = in;
|
||||
this.out = out;
|
||||
@@ -107,7 +107,7 @@ public class BeaconClient implements AutoCloseable {
|
||||
public void close() throws ConnectorException {
|
||||
try {
|
||||
base.close();
|
||||
} catch (IOException ex) {
|
||||
} catch (Exception ex) {
|
||||
throw new ConnectorException("Couldn't close client", ex);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,13 +1,12 @@
|
||||
package io.xpipe.core.process;
|
||||
|
||||
import java.io.Closeable;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.OutputStream;
|
||||
import java.nio.charset.Charset;
|
||||
import java.util.concurrent.ExecutorService;
|
||||
|
||||
public interface ProcessControl extends Closeable, AutoCloseable {
|
||||
public interface ProcessControl extends AutoCloseable {
|
||||
|
||||
@FunctionalInterface
|
||||
interface ExceptionConverter {
|
||||
@@ -37,7 +36,7 @@ public interface ProcessControl extends Closeable, AutoCloseable {
|
||||
void write(byte[] b) throws IOException;
|
||||
|
||||
@Override
|
||||
void close() throws IOException;
|
||||
void close() throws Exception;
|
||||
|
||||
void kill() throws Exception;
|
||||
|
||||
|
||||
@@ -155,7 +155,7 @@ public class ConnectionFileSystem implements FileSystem {
|
||||
// Since we are only closing, just swallow all exceptions
|
||||
try {
|
||||
shellControl.close();
|
||||
} catch (IOException ignored) {
|
||||
} catch (Exception ignored) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user