Log zenity error
This commit is contained in:
@@ -177,7 +177,7 @@ public interface Platform{
|
|||||||
if(result.isEmpty() || result.equals("\n")) return;
|
if(result.isEmpty() || result.equals("\n")) return;
|
||||||
|
|
||||||
if(result.endsWith("\n")) result = result.substring(0, result.length() - 1);
|
if(result.endsWith("\n")) result = result.substring(0, result.length() - 1);
|
||||||
if(result.contains("\n")) throw new IOException("invalid input");
|
if(result.contains("\n")) throw new IOException("invalid input: \"" + result + "\"");
|
||||||
|
|
||||||
Fi file = Core.files.absolute(result);
|
Fi file = Core.files.absolute(result);
|
||||||
Core.app.post(() -> {
|
Core.app.post(() -> {
|
||||||
@@ -190,6 +190,7 @@ public interface Platform{
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}catch(Exception e){
|
}catch(Exception e){
|
||||||
|
Log.err(e);
|
||||||
Log.warn("zenity not found, using non-native file dialog. Consider installing `zenity` for native file dialogs.");
|
Log.warn("zenity not found, using non-native file dialog. Consider installing `zenity` for native file dialogs.");
|
||||||
Core.app.post(fallback);
|
Core.app.post(fallback);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user