Commit af61ecfc authored by Jim Nelson's avatar Jim Nelson

#2516: File monitor wasn't being created when externally editing a previously-edited file.

parent caa10e0f
......@@ -2369,7 +2369,7 @@ public abstract class TransformablePhoto: PhotoSource {
}
protected static BackingPhotoState load_backing_photo_state(File file) throws Error {
FileInfo info = file.query_filesystem_info("standard:*", null);
FileInfo info = file.query_filesystem_info(DirectoryMonitor.SUPPLIED_ATTRIBUTES, null);
TimeVal timestamp;
info.get_modification_time(out timestamp);
......@@ -2504,14 +2504,18 @@ public abstract class TransformablePhoto: PhotoSource {
throw err;
}
// attach the editable file to the photo and start monitoring the new file
// attach the editable file to the photo
attach_editable(editable_file_format, create_editable_file);
start_monitoring_editable(create_editable_file);
current_editable_file = create_editable_file;
}
assert(current_editable_file != null);
// if not already monitoring, monitor now
if (editable_monitor == null)
start_monitoring_editable(current_editable_file);
launch_editor(current_editable_file, get_file_format());
}
......@@ -2579,7 +2583,7 @@ public abstract class TransformablePhoto: PhotoSource {
FileInfo info;
try {
info = file.query_filesystem_info("standard:*", null);
info = file.query_filesystem_info(DirectoryMonitor.SUPPLIED_ATTRIBUTES, null);
} catch (Error err) {
warning("Unable to read editable filesystem info for %s: %s", to_string(), err.message);
detach_editable(false, true);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment