Skip to content
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

Feature Idea: Soft delete #314

Open
leipert opened this issue Aug 18, 2023 · 2 comments
Open

Feature Idea: Soft delete #314

leipert opened this issue Aug 18, 2023 · 2 comments
Labels
class(feature) Indicates work related to a new feature status(backlog) This item is considered for future development

Comments

@leipert
Copy link

leipert commented Aug 18, 2023

If one uses icloud-photos-sync for backup purposes, it'd be great to have a soft-delete mode which moves deleted files into a separate folder rather than just deleting them from the file system.

Probably would "just" be a CLI flag and then instead of an rm, one would move the file.

Probably here:

async deleteAsset(asset: Asset) {
Resources.logger(this).info(`Deleting asset ${asset.getDisplayName()}`);
await fs.promises.rm(asset.getAssetFilePath(), {force: true});
}

and here:

fs.rmSync(uuidPath, {recursive: true});
fs.unlinkSync(albumNamePath);

I might have some time to look at this, but just wanted to leave the idea here.

@steilerDev steilerDev added status(backlog) This item is considered for future development class(feature) Indicates work related to a new feature labels Aug 18, 2023
@steilerDev
Copy link
Owner

steilerDev commented Aug 18, 2023

hey @leipert - that sounds like a reasonable additional feature (and shouldnt be too hard)... let me add it to the backlog

@steilerDev
Copy link
Owner

I've created a separate issue (#354) to explain my proposal for a new library version that should resolve this issue. Would therefore love to get your feedback on there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
class(feature) Indicates work related to a new feature status(backlog) This item is considered for future development
Projects
None yet
Development

No branches or pull requests

2 participants