summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 813b66b)
raw | patch | inline | side by side (parent: 813b66b)
author | JazzyNico <nicoduf@yahoo.fr> | |
Wed, 2 Feb 2011 17:26:59 +0000 (18:26 +0100) | ||
committer | JazzyNico <nicoduf@yahoo.fr> | |
Wed, 2 Feb 2011 17:26:59 +0000 (18:26 +0100) |
src/extension/implementation/script.cpp | patch | blob | history |
index 428ee626fd361f79342dc7624d67f192e62da165..0f234c7d44f60d6c5d3dbe440ca77cd3a1c66154 100644 (file)
#include "xml/attribute-record.h"
#include "util/glib-list-iterators.h"
-
+#include "path-prefix.h"
#ifdef WIN32
*/
bool Script::check_existence(const std::string &command)
{
-
// Check the simple case first
if (command.empty()) {
return false;
return false;
}
}
-
- std::string path = Glib::getenv("PATH");
- if (path.empty()) {
- /* There is no `PATH' in the environment.
- The default search path is the current directory */
- path = G_SEARCHPATH_SEPARATOR_S;
- }
+
+ // First search in the extension path and the current directory
+ std::string path = INKSCAPE_EXTENSIONDIR;
+ path.append(";");
+ path.append(G_SEARCHPATH_SEPARATOR_S);
+ path.append(";");
+ // And then the PATH environment variable.
+ path.append(Glib::getenv("PATH"));
std::string::size_type pos = 0;
std::string::size_type pos2 = 0;