summaryrefslogtreecommitdiffstats
path: root/src/extension/system.cpp
diff options
context:
space:
mode:
authorNicolas Dufour <nicoduf@yahoo.fr>2013-02-15 13:12:46 +0000
committerJazzyNico <nicoduf@yahoo.fr>2013-02-15 13:12:46 +0000
commit3441298ed44e1a00f2c71b73a582755d7bda7cd5 (patch)
tree1df1c9507fd02a480d75b293ab1430bce589907a /src/extension/system.cpp
parentfix yet another warning (diff)
downloadinkscape-3441298ed44e1a00f2c71b73a582755d7bda7cd5.tar.gz
inkscape-3441298ed44e1a00f2c71b73a582755d7bda7cd5.zip
Better fix for Bug #911146 (Inkscape reads .eps files from /tmp instead of the current directory) by Michael Karcher.
(bzr r12127)
Diffstat (limited to 'src/extension/system.cpp')
-rw-r--r--src/extension/system.cpp34
1 files changed, 0 insertions, 34 deletions
diff --git a/src/extension/system.cpp b/src/extension/system.cpp
index 60cd21d71..a9ca5c456 100644
--- a/src/extension/system.cpp
+++ b/src/extension/system.cpp
@@ -69,34 +69,6 @@ static Extension *build_from_reprdoc(Inkscape::XML::Document *doc, Implementatio
*/
SPDocument *open(Extension *key, gchar const *filename)
{
- // Convert to absolute pathname to tolerate chdir().
- bool relpath = (filename[0] != '/');
-#ifdef WIN32
- relpath &= (filename[0] != '\\') && !(isalpha(filename[0]) && (filename[1] == ':'));
-#endif
-
- // Do not consider an URI as a relative path.
- if (relpath) {
- gchar const * cp = filename;
-
- while (isalpha(*cp) || isdigit(*cp) || *cp == '+' || *cp == '-' || *cp == '.')
- cp++;
-
- relpath = *cp != ':' || cp[1] != '/' || cp[2] != '/';
- }
-
- if (relpath) {
- gchar * curdir = NULL;
-#ifndef WIN32
- curdir = getcwd(NULL, 0);
-#else
- curdir = _getcwd(NULL, 0);
-#endif
-
- filename = g_build_filename(curdir, filename, NULL);
- free(curdir);
- }
-
Input *imod = NULL;
if (key == NULL) {
@@ -138,9 +110,6 @@ SPDocument *open(Extension *key, gchar const *filename)
}
if (!imod->prefs(filename)) {
- if (relpath){
- free((void *) filename);
- }
return NULL;
}
@@ -163,9 +132,6 @@ SPDocument *open(Extension *key, gchar const *filename)
imod->set_gui(true);
}
- if (relpath){
- free((void *) filename);
- }
return doc;
}