Skip to content

Commit

Permalink
disable mtime flag when delete files
Browse files Browse the repository at this point in the history
  • Loading branch information
huangnauh committed Jul 26, 2024
1 parent b184a7c commit afc8ae1
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions commands.go
Original file line number Diff line number Diff line change
Expand Up @@ -433,12 +433,12 @@ func NewRmCommand() cli.Command {
mc.ItemType = ITEM_NOT_SET
}

if c.String("mtime") != "" {
err := parseMTime(c.String("mtime"), mc)
if err != nil {
PrintErrorAndExit("rm %s: parse mtime: %v", fpath, err)
}
}
// if c.String("mtime") != "" {
// err := parseMTime(c.String("mtime"), mc)
// if err != nil {
// PrintErrorAndExit("rm %s: parse mtime: %v", fpath, err)
// }
// }

session.Rm(fpath, mc, c.Bool("async"))
return nil
Expand All @@ -447,7 +447,7 @@ func NewRmCommand() cli.Command {
cli.BoolFlag{Name: "d", Usage: "only remove directories"},
cli.BoolFlag{Name: "a", Usage: "remove files, directories and their contents recursively, never prompt"},
cli.BoolFlag{Name: "async", Usage: "remove asynchronously"},
cli.StringFlag{Name: "mtime", Usage: "file's data was last modified n*24 hours ago, same as linux find command."},
// cli.StringFlag{Name: "mtime", Usage: "file's data was last modified n*24 hours ago, same as linux find command."},
},
}
}
Expand Down

0 comments on commit afc8ae1

Please sign in to comment.