From f5a0cee8ccecc7b6c6c2d8e9fb6f6eecd53531fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Frings-F=C3=BCrst?= Date: Sun, 17 Dec 2023 19:58:04 +0100 Subject: New upstream version 0.32.4 --- src/library/LibraryWindow.vala | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) (limited to 'src/library/LibraryWindow.vala') diff --git a/src/library/LibraryWindow.vala b/src/library/LibraryWindow.vala index 849ae2e..280a50b 100644 --- a/src/library/LibraryWindow.vala +++ b/src/library/LibraryWindow.vala @@ -765,17 +765,27 @@ public class LibraryWindow : AppWindow { } Gee.ArrayList jobs = new Gee.ArrayList(); + Gee.ArrayList rejected = new Gee.ArrayList(); foreach (string uri in uris) { File file_or_dir = File.new_for_uri(uri); + if (file_or_dir.get_path() == null) { - // TODO: Specify which directory/file. - AppWindow.error_message(_("Photos cannot be imported from this directory.")); - + rejected.add(uri); continue; } jobs.add(new FileImportJob(file_or_dir, copy_to_library, recurse)); } + + if (rejected.size > 0) { + // TODO: Specify which directory/file. + //var message = ngettext("Photos cannot be imported from this folder", "Photos cannot be imported from these folders", rejected.size) + var message = _("Photos cannot be imported from this directory."); + foreach (var uri in rejected) { + message += uri; + } + AppWindow.error_message(message); + } if (jobs.size > 0) { BatchImport batch_import = new BatchImport(jobs, job_name, import_reporter); -- cgit v1.2.3