From 23d2b29206c471272af3417848fff113d337e419 Mon Sep 17 00:00:00 2001 From: blacktop Date: Sun, 28 Jul 2024 19:15:43 -0600 Subject: [PATCH] Update ota_payload.go --- cmd/ipsw/cmd/ota/ota_payload.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/cmd/ipsw/cmd/ota/ota_payload.go b/cmd/ipsw/cmd/ota/ota_payload.go index f28306f46..6fe456490 100644 --- a/cmd/ipsw/cmd/ota/ota_payload.go +++ b/cmd/ipsw/cmd/ota/ota_payload.go @@ -50,8 +50,8 @@ func init() { otaPayloadCmd.Flags().BoolP("files", "f", false, "Files only") otaPayloadCmd.Flags().BoolP("dirs", "d", false, "Directories only") - viper.BindPFlag("ota.ls.payload.files", otaPayloadCmd.Flags().Lookup("files")) - viper.BindPFlag("ota.ls.payload.dirs", otaPayloadCmd.Flags().Lookup("dirs")) + viper.BindPFlag("ota.payload.files", otaPayloadCmd.Flags().Lookup("files")) + viper.BindPFlag("ota.payload.dirs", otaPayloadCmd.Flags().Lookup("dirs")) } // otaPayloadCmd represents the payload command @@ -69,7 +69,7 @@ var otaPayloadCmd = &cobra.Command{ } color.NoColor = viper.GetBool("no-color") - if viper.GetBool("ota.ls.payload.files") && viper.GetBool("ota.ls.payload.dirs") { + if viper.GetBool("ota.payload.files") && viper.GetBool("ota.payload.dirs") { return fmt.Errorf("cannot use both --files and --dirs flags") } @@ -146,9 +146,9 @@ var otaPayloadCmd = &cobra.Command{ fmt.Fprintf(w, "%s\n", colorModTime(f.String())) } } else { - if viper.GetBool("ota.ls.payload.files") && f.Type != yaa.RegularFile { + if viper.GetBool("ota.payload.files") && f.Type != yaa.RegularFile { continue - } else if viper.GetBool("ota.ls.payload.dirs") && f.Type != yaa.Directory { + } else if viper.GetBool("ota.payload.dirs") && f.Type != yaa.Directory { continue } if f.Path == "" {