mirror of
https://github.com/wgh136/pixes.git
synced 2025-09-27 12:57:24 +00:00
fix download path settings
This commit is contained in:
@@ -279,10 +279,11 @@ class __SetDownloadSubPathPageState extends State<_SetDownloadSubPathPage> {
|
||||
var text = controller.text;
|
||||
if (check(text)) {
|
||||
appdata.settings["downloadSubPath"] = text;
|
||||
appdata.settings["tagsWeight"] = controller2.text;
|
||||
appdata.writeData();
|
||||
context.pop();
|
||||
} else {
|
||||
showToast(context, message: "No Permission".tl);
|
||||
showToast(context, message: "Invalid".tl);
|
||||
}
|
||||
},
|
||||
).toAlign(Alignment.centerRight).paddingRight(16),
|
||||
@@ -296,10 +297,10 @@ class __SetDownloadSubPathPageState extends State<_SetDownloadSubPathPage> {
|
||||
}
|
||||
|
||||
bool check(String text) {
|
||||
if (!text.startsWith('/') || !text.startsWith('\\')) {
|
||||
return false;
|
||||
if (text.startsWith('/') || text.startsWith('\\')) {
|
||||
return true;
|
||||
}
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
String get _instruction => """
|
||||
|
Reference in New Issue
Block a user