mirror of
https://github.com/safing/portmaster
synced 2025-09-02 18:49:14 +00:00
Use new util function for creating/checking dirs
This commit is contained in:
parent
2e59031475
commit
457e6f21a2
1 changed files with 2 additions and 1 deletions
|
@ -4,6 +4,7 @@ import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"os"
|
"os"
|
||||||
|
|
||||||
|
"github.com/safing/portbase/utils"
|
||||||
"github.com/safing/portmaster/updates"
|
"github.com/safing/portmaster/updates"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -25,7 +26,7 @@ func getFile(identifier string) (*updates.File, error) {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
if os.IsNotExist(err) {
|
if os.IsNotExist(err) {
|
||||||
// create dirs
|
// create dirs
|
||||||
err = updates.CheckDir(updateStoragePath)
|
err = utils.EnsureDirectory(updateStoragePath, 0755)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue