summaryrefslogtreecommitdiff
path: root/src/autosave-manager.vala
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff.email>2020-04-13 15:51:22 +0200
committerJörg Frings-Fürst <debian@jff.email>2020-04-13 15:51:22 +0200
commit8067958728bf3ebc9784bfb1d9fd842946e95824 (patch)
tree13cdebf6c35e4d596145af2ed959761e6f110ebc /src/autosave-manager.vala
parentf359f4dcae47a69031b5ae719131c980f9160e47 (diff)
parent81b704e9e098c84fc79243e383e8633c45d02b94 (diff)
Merge branch 'release/debian/3.36.1-1'debian/3.36.1-1
Diffstat (limited to 'src/autosave-manager.vala')
-rw-r--r--src/autosave-manager.vala8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/autosave-manager.vala b/src/autosave-manager.vala
index 84a1e00..c5eb65e 100644
--- a/src/autosave-manager.vala
+++ b/src/autosave-manager.vala
@@ -59,6 +59,12 @@ public class AutosaveManager
page_filenames = new HashTable<Page, string> (direct_hash, direct_equal);
}
+ public bool exists ()
+ {
+ var file = File.new_for_path (AUTOSAVE_PATH);
+ return file.query_exists ();
+ }
+
public void load ()
{
debug ("Loading autosave information");
@@ -328,7 +334,7 @@ public class AutosaveManager
file.set_integer (page_name, "crop-height", page.crop_height);
}
file.set_value ("simple-scan", "pages", page_names);
-
+
try
{
DirUtils.create_with_parents (AUTOSAVE_DIR, 0777);