summaryrefslogtreecommitdiff
path: root/src/book.vala
diff options
context:
space:
mode:
authorAlessio Treglia <alessio@debian.org>2012-04-20 12:04:46 +0200
committerAlessio Treglia <alessio@debian.org>2012-04-20 12:04:46 +0200
commit81e2fef032931d0748d94c7d2625fe07499f77c3 (patch)
treeeebac3f3670b86e0a382952206ccd7282324450f /src/book.vala
parent3423cc86f86a823a318ea72981dc8eb889fc7987 (diff)
Imported Upstream version 3.4.1upstream/3.4.1
Diffstat (limited to 'src/book.vala')
-rw-r--r--src/book.vala4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/book.vala b/src/book.vala
index c931f41..76a1901 100644
--- a/src/book.vala
+++ b/src/book.vala
@@ -85,7 +85,7 @@ public class Book
private File make_indexed_file (string uri, int i)
{
- if (i == 0)
+ if (get_n_pages () == 1)
return File.new_for_uri (uri);
/* Insert index before extension */
@@ -98,7 +98,7 @@ public class Book
prefix = uri.slice (0, uri.length - suffix.length);
}
- return File.new_for_uri ("%s-%d%s".printf (prefix, i, suffix));
+ return File.new_for_uri ("%s-%d%s".printf (prefix, i+1, suffix));
}
private void save_multi_file (string type, File file) throws Error