File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed
engine/internal/retrieval/engine/postgres/logical Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ import (
10
10
"bytes"
11
11
"context"
12
12
"fmt"
13
+ "io/fs"
13
14
"os"
14
15
"path"
15
16
"path/filepath"
@@ -165,7 +166,18 @@ func (r *RestoreJob) Reload(cfg map[string]interface{}) (err error) {
165
166
166
167
stat , err := os .Stat (r .RestoreOptions .DumpLocation )
167
168
if err != nil {
168
- return errors .Wrap (err , "dumpLocation not found" )
169
+ if ! errors .Is (err , fs .ErrNotExist ) {
170
+ return errors .Wrap (err , "cannot get stats of dumpLocation" )
171
+ }
172
+
173
+ if err := os .MkdirAll (r .RestoreOptions .DumpLocation , 0666 ); err != nil {
174
+ return fmt .Errorf ("error creating dumpLocation directory: %w" , err )
175
+ }
176
+
177
+ stat , err = os .Stat (r .RestoreOptions .DumpLocation )
178
+ if err != nil {
179
+ return fmt .Errorf ("cannot get stats of dumpLocation: %w" , err )
180
+ }
169
181
}
170
182
171
183
r .isDumpLocationDir = stat .IsDir ()
You can’t perform that action at this time.
0 commit comments