mirror of
https://github.com/rocky-linux/srpmproc.git
synced 2024-12-04 18:36:26 +00:00
fix: fetch should respect root
This commit is contained in:
parent
6483386e19
commit
ef5bd995b1
@ -80,12 +80,12 @@ func Fetch(cdnUrl string, dir string) error {
|
||||
return fmt.Errorf("checksum in metadata does not match dist-git file")
|
||||
}
|
||||
|
||||
err = os.MkdirAll(filepath.Dir(path), 0755)
|
||||
err = os.MkdirAll(filepath.Join(dir, filepath.Dir(path)), 0755)
|
||||
if err != nil {
|
||||
return fmt.Errorf("could create all directories")
|
||||
}
|
||||
|
||||
f, err := os.Create(path)
|
||||
f, err := os.Create(filepath.Join(dir, path))
|
||||
if err != nil {
|
||||
return fmt.Errorf("could not open file pointer: %v", err)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user