summaryrefslogtreecommitdiff
path: root/src/library
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff.email>2023-12-17 19:58:04 +0100
committerJörg Frings-Fürst <debian@jff.email>2023-12-17 19:58:04 +0100
commitf5a0cee8ccecc7b6c6c2d8e9fb6f6eecd53531fe (patch)
tree4fe410ce27a30bc752d350aa042dae8fd042d0a1 /src/library
parent87ba373882f475f02a524a120b59ea9fcccf14e5 (diff)
New upstream version 0.32.4upstream/0.32.4
Diffstat (limited to 'src/library')
-rw-r--r--src/library/LibraryWindow.vala16
1 files changed, 13 insertions, 3 deletions
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<FileImportJob> jobs = new Gee.ArrayList<FileImportJob>();
+ Gee.ArrayList<string> rejected = new Gee.ArrayList<string>();
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);