From afc8ae1fdcbbc01476f92547c03941d0534db973 Mon Sep 17 00:00:00 2001 From: Libo Huang Date: Fri, 26 Jul 2024 17:15:08 +0800 Subject: [PATCH] disable mtime flag when delete files --- commands.go | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/commands.go b/commands.go index 92126d8..b86ed29 100644 --- a/commands.go +++ b/commands.go @@ -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 @@ -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."}, }, } }