summaryrefslogtreecommitdiffstats
path: root/src/inkscape.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/inkscape.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/inkscape.cpp')
-rw-r--r--src/inkscape.cpp16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/inkscape.cpp b/src/inkscape.cpp
index ac419784f..eca19c4b9 100644
--- a/src/inkscape.cpp
+++ b/src/inkscape.cpp
@@ -364,15 +364,17 @@ static gint inkscape_autosave(gpointer)
while( (filename = g_dir_read_name(autosave_dir_ptr)) != NULL ){
if ( strncmp(filename, baseName, strlen(baseName)) == 0 ){
gchar* full_path = g_build_filename( autosave_dir.c_str(), filename, NULL );
- if ( g_stat(full_path, &sb) != -1 ) {
- if ( difftime(sb.st_ctime, min_time) < 0 || min_time == 0 ){
- min_time = sb.st_ctime;
- if ( oldest_autosave ) {
- g_free(oldest_autosave);
+ if (g_file_test (full_path, G_FILE_TEST_EXISTS)){
+ if ( g_stat(full_path, &sb) != -1 ) {
+ if ( difftime(sb.st_ctime, min_time) < 0 || min_time == 0 ){
+ min_time = sb.st_ctime;
+ if ( oldest_autosave ) {
+ g_free(oldest_autosave);
+ }
+ oldest_autosave = g_strdup(full_path);
}
- oldest_autosave = g_strdup(full_path);
+ count ++;
}
- count ++;
}
g_free(full_path);
}