New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Import: Never remove ignored folders such as for Syncthing #1319
Comments
When you chose not to move files from import but to copy them only - this way, nothing gets deleted. If you selected "move" in Library > Import, then a .ppignore file still won't prevent empty folders in import from getting deleted. |
Maybe we can add a list of protected folders like for Syncthing and Git that never get touched. Would that help?
|
That should help a lot! I specifically use move instead of copy since I want Syncthing to automatically remove the imported files from my local Photoprism import folders once the import is done. For example, I have Syncthing set up to sync the DCIM folder on my phone with a folder in Photoprism's import directory on my server, so by using move on import I can free up space on my phone. |
How does Syncthing know the import is done? |
Ah, sorry, I worded that a bit unclearly; Syncthing doesn't wait for the import to finish, so it doesn't need to know when the import is done. All it does is keep folders on different devices synchronized, so if Photoprism removes a file from a folder watched by Syncthing during an import these will also be removed from any synchronized devices. My current setup is more or less
where I usually regularly copy the DCIM folders from my cameras to the laptop/desktop import folders. Photoprism is running on a hosted remote VPS. This lets me back up and import images independently of the SD card or camera the images came from as soon as they've been copied to my laptop or desktop import folder. Works quite well when offline or on a slow network connection where uploading directly from the SD card or camera to Photoprism through WebDAV or similar would have issues. |
Started a preview build for testing my changes: https://drone.photoprism.app/photoprism/photoprism/ |
Nice, thank you very much! 😃 The changes in 65c3967 seem like they should good solution for this indeed, will see if I can test it soon. |
We decided to remove such folders as some operating systems always create hidden files and folders for keeping extended attributes, so practically empty directories would never get deleted. Some less experienced users might now wonder why their empty folders are still around - that's the tradeoff. |
Updated Docker images are available now. |
We've released it already as it works for us, just tested it again. Let us know if you still have issues. |
Thank you very much again - will do! |
Just wanted to leave a quick note to verify that updating Photoprism to build |
Would it be possible to also include |
Are you using our latest version? .folders should all be ignored now |
I am using the latest version. |
Add it to a ".ppignore" file then |
Following the discussion on #1348 |
I'm like #280 using Syncthing to put files in my import directory from various devices. Syncthing creates and requires an empty folder named
.stfolder
to mark its folders, which is currently deleted by Photoprism (which subsequently breaks Syncthing) after an import even if.stfolder
is specified in the.ppignore
file in the import folder.photoprism/internal/api/import.go
Lines 82 to 88 in ed3287d
Putting a file such as
ppkeep
in.stfolder
does prevent deletion after import without affecting Syncthing, so it's not a large issue for my use case at least.I'm not sure if this is a bug or feature request since the documentation I've found doesn't specify that Photoprism won't delete folders specified in
.ppignore
, but I at least initially expected.ppignore
would protect the folder from being deleted from previous.ignore
-type files I've used.The text was updated successfully, but these errors were encountered: