aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPřemysl Eric Janouch <p@janouch.name>2022-07-30 23:56:15 +0200
committerPřemysl Eric Janouch <p@janouch.name>2022-07-31 00:12:53 +0200
commitfefb4c16ac1b48ba5a5b9278b1060e84a4566812 (patch)
treea0324ec28f954f73a5edccdcb80b6bd1901a297a
parent6baf1a7bbd82993d517d389993636e4ac08ff3e0 (diff)
downloadfiv-fefb4c16ac1b48ba5a5b9278b1060e84a4566812.tar.gz
fiv-fefb4c16ac1b48ba5a5b9278b1060e84a4566812.tar.xz
fiv-fefb4c16ac1b48ba5a5b9278b1060e84a4566812.zip
Support file information for FUSE-mounted paths
-rw-r--r--fiv-view.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/fiv-view.c b/fiv-view.c
index 66944b6..f1708a4 100644
--- a/fiv-view.c
+++ b/fiv-view.c
@@ -1209,13 +1209,18 @@ info(FivView *self)
GtkWindow *window = get_toplevel(GTK_WIDGET(self));
int flags = G_SUBPROCESS_FLAGS_STDOUT_PIPE | G_SUBPROCESS_FLAGS_STDERR_PIPE;
- GError *error = NULL;
- gchar *path = g_filename_from_uri(self->uri, NULL, &error);
+ GFile *file = g_file_new_for_uri(self->uri);
+ gchar *path = g_file_get_path(file);
+ g_object_unref(file);
if (!path) {
- show_error_dialog(window, error);
+ // TODO(p): Support piping to exiftool (use "-" as path).
+ show_error_dialog(window,
+ g_error_new_literal(G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED,
+ "files without a local path aren't supported"));
return;
}
+ GError *error = NULL;
GSubprocess *subprocess = g_subprocess_new(flags, &error, "exiftool",
"-tab", "-groupNames", "-duplicates", "-extractEmbedded", "--binary",
"-quiet", "--", path, NULL);