summaryrefslogtreecommitdiffstats
path: root/src/io/sys.cpp
diff options
context:
space:
mode:
authorsu_v <suv-sf@users.sourceforge.net>2013-04-08 15:06:08 +0000
committer~suv <suv-sf@users.sourceforge.net>2013-04-08 15:06:08 +0000
commitf332fa6dbb58ab6b8e17f9b720f334c5e2722812 (patch)
tree2ead4c65ceb8f91aeb84628f9ca4849547d281c9 /src/io/sys.cpp
parentmerge from trunk (r12258) (diff)
parentImplement read/write of image-rendering property. To be used to control scaling. (diff)
downloadinkscape-f332fa6dbb58ab6b8e17f9b720f334c5e2722812.tar.gz
inkscape-f332fa6dbb58ab6b8e17f9b720f334c5e2722812.zip
merge from trunk (r12272)
(bzr r11668.1.66)
Diffstat (limited to 'src/io/sys.cpp')
-rw-r--r--src/io/sys.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/io/sys.cpp b/src/io/sys.cpp
index 60e850c96..94175176a 100644
--- a/src/io/sys.cpp
+++ b/src/io/sys.cpp
@@ -227,8 +227,10 @@ bool Inkscape::IO::file_is_writable( char const *utf8name)
}
if ( filename ) {
struct stat st;
- if(g_lstat (filename, &st) == 0) {
- success = ((st.st_mode & S_IWRITE) != 0);
+ if (g_file_test (filename, G_FILE_TEST_EXISTS)){
+ if (g_lstat (filename, &st) == 0) {
+ success = ((st.st_mode & S_IWRITE) != 0);
+ }
}
g_free(filename);
filename = NULL;