Skip to content

Fixing delete files flag and other improvements#97

Closed
SeqLaz wants to merge 4 commits intomasterfrom
fixing_delete_files_flag_and_other_improvements
Closed

Fixing delete files flag and other improvements#97
SeqLaz wants to merge 4 commits intomasterfrom
fixing_delete_files_flag_and_other_improvements

Conversation

@SeqLaz
Copy link
Member

@SeqLaz SeqLaz commented Feb 17, 2026

In this PR added the option to use the qfieldcloud-cli delete-files with a path, paths or by using directly the --filter option and other improvement in the count of the success and failed deleted files.

Copy link
Collaborator

@suricactus suricactus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably I miss something, but what is the difference if you pass --paths and --filter?

Aren't they doing exactly the same, especially if you combine them together all_patterns = list(paths) + list(filter) ?

@SeqLaz
Copy link
Member Author

SeqLaz commented Feb 19, 2026

Probably I miss something, but what is the difference if you pass --paths and --filter?

Aren't they doing exactly the same, especially if you combine them together all_patterns = list(paths) + list(filter) ?

Actually the --paths is not an option, and this is for given the list of files, example:

qfieldcloud-cli delete-files '123e4567-e89b-12d3-a456-426614174000' 'DCIM/tree-202411202334943.jpg' 'DCIM/tree-202411202331234.jpg'

When trying to use the --paths return the following error:

qfieldcloud-cli delete-files "b4dc48e4-5fd1-4b82-8b16-a4403bfee804" --paths "DCIM/tree-202411202334943.jpg' 'DCIM/tree-202411202331234.jpg"                                                                                           

Usage: qfieldcloud-cli delete-files [OPTIONS] PROJECT_ID [PATHS]...
Try 'qfieldcloud-cli delete-files --help' for help.

Error: No such option: --paths

@suricactus
Copy link
Collaborator

Ok, sorry, you are right about the usage. But still, what is the functional difference between the two?

@SeqLaz
Copy link
Member Author

SeqLaz commented Feb 20, 2026

Ok, sorry, you are right about the usage. But still, what is the functional difference between the two?

Is more for give the user the explicit --filter flag, but feel free to close it if not needed! 🦾 🥷

@suricactus
Copy link
Collaborator

We keep either or, but not both.

I see two paths forward:

  • we close this pr
  • we deprecate the old API and soon enough we remove it. But if we keep the new one, I wouod suggest we pass --filter multiple times instead of a list of paths.

Personally I woul like prefer if there is no change.

@SeqLaz
Copy link
Member Author

SeqLaz commented Feb 20, 2026

At the moment I would like to prefer to close it, and when needed create a new PR! 🦾 🥷

@SeqLaz SeqLaz closed this Feb 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants