https://bugs.kde.org/show_bug.cgi?id=523631

            Bug ID: 523631
           Summary: Import: all downloads fail when the destination
                    collection is on a CIFS/SMB network share
    Classification: Applications
           Product: digikam
      Version First 9.1.0
       Reported In:
          Platform: Other
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: Import-Albums
          Assignee: [email protected]
          Reporter: [email protected]
  Target Milestone: ---

## Steps to reproduce

1. Register a collection on a CIFS/SMB share (Settings → Collections →
Collection on Network Share), mounted at e.g. `/mnt/share/library`.
2. Insert an SD card, open the Import tool.
3. Select any items; set the destination to an album in that collection.
4. Start the download.

## Actual result

Every item fails. The card is read correctly — thumbnails and metadata display
normally — but no file is written. With `QT_LOGGING_RULES='digikam*=true'`, per
file:

```
digikam.import: Downloading:  "IMG_0001.JPG"  using  "/mnt/share/library/Album
Name/"
digikam.import: Failed to open destination file for writing:
"/mnt/share/library/Album Name/"
digikam.import: Log ( "IMG_0001.JPG"  "/run/media/user/CARD/folder/" :  "Failed
to download ‘IMG_0001.JPG’"
```

`strace -f -e trace=openat` shows two failing calls per file:

```
openat(AT_FDCWD, "/mnt/share/library/Album Name", O_RDWR|O_CLOEXEC|O_TMPFILE,
0600) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/mnt/share/library/Album Name/",
O_WRONLY|O_CREAT|O_TRUNC|O_CLOEXEC, 0666) = -1 EISDIR (Is a directory)
```

## Expected result

Files are downloaded into the destination album, as they are when the
destination collection is on a local filesystem.

## Notes

- `cp` of the same source file into the same destination directory succeeds;
`touch` and `rm` there also succeed.
- Real kernel CIFS mount (not GVFS), `vers=3.1.1`, correct `uid`/`gid`;
`findmnt` shows `rw` and the expected username. Server-side directory exists
and is world-writable.
- digiKam's **Export → to local storage** writes into the same collection
successfully in the same session.
- Importing to a collection on a local filesystem works normally.
- Not the "no default download album selected" FAQ case; setting one changes
nothing.

## Workaround

Copy with `rsync`/`cp`, then Tools → Maintenance → Scan for new items.

Note for transparency: a llm was used to make this bug report more concise.

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to