fix opencloud trash flags

Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
This commit is contained in:
Jörn Friedrich Dreyer
2025-12-12 14:55:40 +01:00
committed by Florian Schade
parent 6204c6b3cb
commit eebccf7c78

View File

@@ -41,7 +41,8 @@ func TrashPurgeEmptyDirsCommand(cfg *config.Config) *cobra.Command {
return nil
}
if err := trash.PurgeTrashEmptyPaths(basePath, cmd.Flag("dry-run").Changed); err != nil {
dryRun, _ := cmd.Flags().GetBool("dry-run")
if err := trash.PurgeTrashEmptyPaths(basePath, dryRun); err != nil {
fmt.Println(err)
return err
}