File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -146,14 +146,14 @@ func preRun(cmd *cobra.Command, args []string) error {
146146 return fmt .Errorf ("%w: %s" , util .ErrNoDump , action .Dialect .Name ())
147147 }
148148
149- var isDir bool
150- if action .Filename != "" {
151- if stat , err := os .Stat (action .Filename ); err == nil && stat . IsDir () {
152- isDir = true
149+ isDir := action . Filename == "" || strings . HasSuffix ( action . Filename , string ( os . PathSeparator )) || storage . IsCloudDir ( action . Filename )
150+ if ! isDir && ! storage . IsCloud ( action .Filename ) {
151+ if stat , err := os .Stat (action .Filename ); err == nil {
152+ isDir = stat . IsDir ()
153153 }
154154 }
155155
156- if action . Filename == "" || isDir || strings . HasSuffix ( action . Filename , string ( os . PathSeparator )) || storage . IsCloudDir ( action . Filename ) {
156+ if isDir {
157157 generated := dump.Filename {
158158 Database : action .Database ,
159159 Namespace : action .Client .Namespace ,
You can’t perform that action at this time.
0 commit comments