aboutsummaryrefslogtreecommitdiff
path: root/platform/x11
diff options
context:
space:
mode:
authorJ08nY2017-10-13 16:45:24 +0200
committerJ08nY2017-10-13 16:45:24 +0200
commitb1252caa10b9016547e1a99f546254fa61b335b9 (patch)
tree6786eb48cf0871932583d19a1bbe92dbfb60338f /platform/x11
parent6147c04ae2eace58b4283d2facd1b71ef557a12c (diff)
downloadgodot-fix/use-bin-name.tar.gz
godot-fix/use-bin-name.tar.zst
godot-fix/use-bin-name.zip
Use binary names instead of absolute paths in calls to OS::execute.fix/use-bin-name
Now that #12009 is merged, we should let the system find the binary on the users $PATH and don't assume we know where to look for them in different distributions.
Diffstat (limited to 'platform/x11')
-rw-r--r--platform/x11/os_x11.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/platform/x11/os_x11.cpp b/platform/x11/os_x11.cpp
index e389c6932..bc18d0c1f 100644
--- a/platform/x11/os_x11.cpp
+++ b/platform/x11/os_x11.cpp
@@ -1939,7 +1939,7 @@ Error OS_X11::shell_open(String p_uri) {
Error ok;
List<String> args;
args.push_back(p_uri);
- ok = execute("/usr/bin/xdg-open", args, false);
+ ok = execute("xdg-open", args, false);
if (ok == OK)
return OK;
ok = execute("gnome-open", args, false);
@@ -2003,7 +2003,7 @@ String OS_X11::get_system_dir(SystemDir p_dir) const {
String pipe;
List<String> arg;
arg.push_back(xdgparam);
- Error err = const_cast<OS_X11 *>(this)->execute("/usr/bin/xdg-user-dir", arg, true, NULL, &pipe);
+ Error err = const_cast<OS_X11 *>(this)->execute("xdg-user-dir", arg, true, NULL, &pipe);
if (err != OK)
return ".";
return pipe.strip_edges();
@@ -2053,7 +2053,7 @@ void OS_X11::alert(const String &p_alert, const String &p_title) {
args.push_back(p_title);
args.push_back(p_alert);
- execute("/usr/bin/xmessage", args, true);
+ execute("xmessage", args, true);
}
void OS_X11::set_icon(const Ref<Image> &p_icon) {
@@ -2236,12 +2236,12 @@ Error OS_X11::move_to_trash(const String &p_path) {
List<String> args;
args.push_back("-p");
args.push_back(trashcan);
- Error err = execute("/bin/mkdir", args, true);
+ Error err = execute("mkdir", args, true);
if (err == OK) {
List<String> args2;
args2.push_back(p_path);
args2.push_back(trashcan);
- err = execute("/bin/mv", args2, true);
+ err = execute("mv", args2, true);
}
return err;