@@ -81,17 +81,17 @@ func (cfg Config) validateParents(c path.ContextPath) report.Report {
81
81
r := report.Report {}
82
82
83
83
for i , f := range cfg .Storage .Files {
84
- r = handlePathConflict (f .Path , "files" , i , c , r , errors .ErrPathConflictsParentDir )
84
+ r = handlePathConflict (f .Path , "files" , i , c , r , errors .ErrPathAlreadyExists )
85
85
addPathAndEntry (f .Path , "files" , & entries )
86
86
}
87
87
88
88
for i , d := range cfg .Storage .Directories {
89
- r = handlePathConflict (d .Path , "directories" , i , c , r , errors .ErrPathConflictsParentDir )
89
+ r = handlePathConflict (d .Path , "directories" , i , c , r , errors .ErrPathAlreadyExists )
90
90
addPathAndEntry (d .Path , "directories" , & entries )
91
91
}
92
92
93
93
for i , l := range cfg .Storage .Links {
94
- r = handlePathConflict (l .Path , "links" , i , c , r , errors .ErrPathConflictsParentDir )
94
+ r = handlePathConflict (l .Path , "links" , i , c , r , errors .ErrPathAlreadyExists )
95
95
addPathAndEntry (l .Path , "links" , & entries )
96
96
}
97
97
@@ -102,7 +102,7 @@ func (cfg Config) validateParents(c path.ContextPath) report.Report {
102
102
for i , entry := range entries {
103
103
if i > 0 && isWithin (entry .Path , entries [i - 1 ].Path ) {
104
104
if entries [i - 1 ].Field != "directories" {
105
- r .AddOnError (c .Append ("storage" , entry .Field , i , "path" ), errors .ErrPathConflictsParentDir )
105
+ r .AddOnError (c .Append ("storage" , entry .Field , i , "path" ), errors .ErrMisslabeledDir )
106
106
return r
107
107
}
108
108
}
0 commit comments