summaryrefslogtreecommitdiff
path: root/src/library
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff.email>2023-12-17 19:58:25 +0100
committerJörg Frings-Fürst <debian@jff.email>2023-12-17 19:58:25 +0100
commit4cb46f4de4b881e5b1f65af017dca6f3917e55e5 (patch)
treefb359e210d2d9c30f5ad36a447ea29b62ae9bb56 /src/library
parent841f952294b349b2b8e2afb5305ce34a3b59bb4b (diff)
parentf5a0cee8ccecc7b6c6c2d8e9fb6f6eecd53531fe (diff)
Update upstream source from tag 'upstream/0.32.4'
Update to upstream version '0.32.4' with Debian dir 51798a6af1c9b7e48f979c020d72f3c5ddd964a6
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);