summaryrefslogtreecommitdiff
path: root/src/Photo.vala
diff options
context:
space:
mode:
Diffstat (limited to 'src/Photo.vala')
-rw-r--r--src/Photo.vala6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/Photo.vala b/src/Photo.vala
index f636a32..1cab22f 100644
--- a/src/Photo.vala
+++ b/src/Photo.vala
@@ -405,9 +405,7 @@ public abstract class Photo : PhotoSource, Dateable, Positionable {
readers.master = row.master.file_format.create_reader(row.master.filepath);
// get the file title of the Photo without using a File object, skipping the separator itself
- string? basename = String.sliced_at_last_char(row.master.filepath, Path.DIR_SEPARATOR);
- if (basename != null)
- file_title = String.sliced_at(basename, 1);
+ file_title = Path.get_basename(row.master.filepath);
if (is_string_empty(file_title))
file_title = row.master.filepath;
@@ -3725,7 +3723,7 @@ public abstract class Photo : PhotoSource, Dateable, Positionable {
if (metadata == null)
metadata = export_format.create_metadata();
- if (!export_format.can_write())
+ if (!export_format.can_write_image())
export_format = PhotoFileFormat.get_system_default_format();
PhotoFileWriter writer = export_format.create_writer(dest_file.get_path());