fix stale link detection when base files dir missing

This commit is contained in:
Thomas G. Lopes
2026-03-11 12:10:56 +00:00
parent 3e5d2dcc54
commit 5dfc83ad7a
2 changed files with 8 additions and 1 deletions
+7
View File
@@ -154,6 +154,13 @@ func FindStaleLinksMulti(filesDirs []string, targetRoot string) ([]string, error
// First pass: walk source directories to find files that exist
for _, filesDir := range filesDirs {
if _, err := os.Stat(filesDir); err != nil {
if errors.Is(err, os.ErrNotExist) {
continue
}
return nil, err
}
filesAbs, err := filepath.Abs(filesDir)
if err != nil {
return nil, err