summaryrefslogtreecommitdiff
path: root/src/autosave-manager.vala
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff.email>2020-03-22 17:06:01 +0100
committerJörg Frings-Fürst <debian@jff.email>2020-03-22 17:06:01 +0100
commit7ac7082eb0fa3735eb23acf72dbe607217a358c2 (patch)
treeeaaa24afe631aaee5c974eae548f6a0d52ad9677 /src/autosave-manager.vala
parentae74184112077229d41e2ee633cc69f038482446 (diff)
parent8eb2b297d6e03975afc17e1d468aa8913639e1a9 (diff)
Update upstream source from tag 'upstream/3.36.0'
Update to upstream version '3.36.0' with Debian dir 54f0a2ec8f9f5de5b2af336ce18e8f826001f5cd
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);