From 519f11e81d1a06730bf37bb5da7cb0e18abde064 Mon Sep 17 00:00:00 2001 From: David Capello Date: Mon, 11 Apr 2016 13:00:39 -0300 Subject: [PATCH] Fix open in folder on Linux --- src/base/launcher.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/base/launcher.cpp b/src/base/launcher.cpp index 734902bd0..fd1541a15 100644 --- a/src/base/launcher.cpp +++ b/src/base/launcher.cpp @@ -1,5 +1,5 @@ // Aseprite Base Library -// Copyright (c) 2001-2013, 2015 David Capello +// Copyright (c) 2001-2016 David Capello // // This file is released under the terms of the MIT license. // Read LICENSE.txt for more information. @@ -121,8 +121,10 @@ bool open_folder(const std::string& _file) #else - int ret; - ret = std::system(("xdg-open \"" + file + "\"").c_str()); + if (!base::is_directory(file)) + file = base::get_file_path(file); + + int ret = std::system(("xdg-open \"" + file + "\"").c_str()); return (ret == 0); #endif