Skip to content

Import: Add option to not delete empty folders#4092

Closed
zhzy0077 wants to merge 1 commit into
photoprism:developfrom
zhzy0077:delete
Closed

Import: Add option to not delete empty folders#4092
zhzy0077 wants to merge 1 commit into
photoprism:developfrom
zhzy0077:delete

Conversation

@zhzy0077
Copy link
Copy Markdown

@zhzy0077 zhzy0077 commented Mar 7, 2024

  • What does it implement / fix / improve? Why?
    For Synology Cloud Sync, it fails to sync to the WebDav when the folder doesn't exist. It won't create folders as part of the incremental sync. As a result, people see
2024-03-07 21:16:00 ERRO webdav: 'open /photoprism/import/x.jpg: no such file or directory' in PUT /import/x.jpg

The changes in this PR allow user to set a configuration to stop deleting empty folders after import.

  • Are the changes related to an existing issue?
    No.

Acceptance Criteria:

  • Features and enhancements must be fully implemented so that they can be released at any time without additional work
  • Automated unit and/or acceptance tests are mandatory to ensure the changes work as expected and to reduce repetitive manual work
  • Frontend components must be responsive to work and look properly on phones, tablets, and desktop computers; you must have tested them on all major browsers and different devices
  • Documentation and translation updates should be provided if needed
  • In case you submit database-related changes, they must be tested and compatible with SQLite 3 and MariaDB 10.5.12+

@CLAassistant
Copy link
Copy Markdown

CLAassistant commented Mar 7, 2024

CLA assistant check
All committers have signed the CLA.

@graciousgrey
Copy link
Copy Markdown
Member

Thank you very much for your contribution. We will review it as soon as our time allows.

@lastzero lastzero changed the title feat: do not delete folders flag Import: Add option to not delete empty folders Mar 28, 2025
lastzero added a commit that referenced this pull request Mar 28, 2025
This prevents directories from being deleted when using the "move"
import option, which would otherwise delete hidden files and empty
directories.

Signed-off-by: Michael Mayer <michael@photoprism.app>
@lastzero
Copy link
Copy Markdown
Member

@zhzy0077 Thanks again for your contribution and feedback! We're sorry we couldn't get to this sooner. 😞

The above commit will preserve any ".keep" and/or ".gitkeep" files in import directories. So if you add one, this will prevent the folder from being deleted, since only empty directories are deleted when using the move option.

Does this meet your needs? Any help in testing this with our preview build will be much appreciated:

Since this is now implemented and the changes in the PR are no longer needed, I will close it and set the status to Preview for final testing.

@lastzero lastzero closed this Mar 28, 2025
@lastzero lastzero added enhancement please-test Ready for acceptance test labels Mar 28, 2025
@lastzero lastzero moved this to Preview 🐳 in Roadmap πŸš€βœ¨ Mar 28, 2025
@graciousgrey graciousgrey added tested Changes have been tested successfully and removed please-test Ready for acceptance test labels Apr 1, 2025
@graciousgrey graciousgrey moved this from Preview 🐳 to Release 🌈 in Roadmap πŸš€βœ¨ Apr 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

tested Changes have been tested successfully

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

4 participants