summaryrefslogtreecommitdiffstats
path: root/src/inkscape.cpp
diff options
context:
space:
mode:
authorMarkus Engel <markus.engel@tum.de>2013-04-05 19:09:30 +0000
committerMarkus Engel <markus.engel@tum.de>2013-04-05 19:09:30 +0000
commit38d12b0b147681fbaf6b773394ea20abf184732c (patch)
treeea5cd0d25e50f8637214fed33dc5d973a60ac5ce /src/inkscape.cpp
parentMerged FlowX classes. (diff)
parentFix for Bug #1163759 (Mouse selection ignores transform). (diff)
downloadinkscape-38d12b0b147681fbaf6b773394ea20abf184732c.tar.gz
inkscape-38d12b0b147681fbaf6b773394ea20abf184732c.zip
merged from trunk (r12265)
(bzr r11608.1.80)
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);
}