Skip to content

Commit bf01165

Browse files
phdMassimiliano Pippi
authored and
Massimiliano Pippi
committed
check if PackagesDir exists when reporting it in HardwareDirectories() (#533)
1 parent 3809fc3 commit bf01165

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Diff for: configuration/directories.go

+4-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,10 @@ func HardwareDirectories() paths.PathList {
3333
}
3434

3535
if viper.IsSet("directories.Data") {
36-
res.Add(PackagesDir())
36+
packagesDir := PackagesDir()
37+
if packagesDir.IsDir() {
38+
res.Add(packagesDir)
39+
}
3740
}
3841

3942
if viper.IsSet("directories.User") {

0 commit comments

Comments
 (0)