mirror of
https://github.com/xpipe-io/xpipe.git
synced 2026-05-03 11:20:34 +00:00
Fixes
This commit is contained in:
@@ -80,7 +80,7 @@ public class NewItemMenuProvider implements BrowserMenuBranchProvider {
|
||||
.toList();
|
||||
var builder = NewFileActionProvider.Action.builder();
|
||||
builder.initFiles(model, fixedFiles);
|
||||
builder.name(name.getValue());
|
||||
builder.name(name.getValue().strip());
|
||||
builder.build().executeAsync();
|
||||
});
|
||||
modal.show();
|
||||
@@ -127,7 +127,7 @@ public class NewItemMenuProvider implements BrowserMenuBranchProvider {
|
||||
.toList();
|
||||
var builder = NewDirectoryActionProvider.Action.builder();
|
||||
builder.initFiles(model, fixedFiles);
|
||||
builder.name(name.getValue());
|
||||
builder.name(name.getValue().strip());
|
||||
builder.build().executeAsync();
|
||||
});
|
||||
modal.show();
|
||||
@@ -179,7 +179,7 @@ public class NewItemMenuProvider implements BrowserMenuBranchProvider {
|
||||
.toList();
|
||||
var builder = NewLinkActionProvider.Action.builder();
|
||||
builder.initFiles(model, fixedFiles);
|
||||
builder.name(linkName.getValue());
|
||||
builder.name(linkName.getValue().strip());
|
||||
builder.target(FilePath.of(target.getValue()));
|
||||
builder.build().executeAsync();
|
||||
});
|
||||
|
||||
@@ -4,6 +4,7 @@ import io.xpipe.app.core.AppLayoutModel;
|
||||
import io.xpipe.app.core.AppProperties;
|
||||
import io.xpipe.app.issue.ErrorEventFactory;
|
||||
import io.xpipe.app.issue.TrackEvent;
|
||||
import io.xpipe.app.prefs.AppPrefs;
|
||||
import io.xpipe.app.util.*;
|
||||
import io.xpipe.core.JacksonMapper;
|
||||
import io.xpipe.core.OsType;
|
||||
@@ -78,6 +79,7 @@ public class AppDownloads {
|
||||
req.put("first", first);
|
||||
req.put("license", LicenseProvider.get().getLicenseId());
|
||||
req.put("dist", AppDistributionType.get().getId());
|
||||
req.put("lang", AppPrefs.get() != null ? AppPrefs.get().language().getValue().getId() : null);
|
||||
var url = URI.create("https://api.xpipe.io/version");
|
||||
|
||||
var builder = HttpRequest.newBuilder();
|
||||
|
||||
@@ -33,10 +33,10 @@ public final class FilePath {
|
||||
private FilePath(@NonNull String value) {
|
||||
this.value = value;
|
||||
if (value.isBlank()) {
|
||||
throw new IllegalArgumentException();
|
||||
throw new IllegalArgumentException("File path is empty");
|
||||
}
|
||||
if (!value.equals(value.strip())) {
|
||||
throw new IllegalArgumentException();
|
||||
throw new IllegalArgumentException("File path " + value + " has leading or trailing spaces");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user