Skip to content

Commit c29f2d4

Browse files
committed
🐛 Fix symlinked directories not followed when building works
1 parent 408dc5f commit c29f2d4

File tree

2 files changed

+13
-5
lines changed

2 files changed

+13
-5
lines changed

CHANGELOG.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1111

1212
- use `magick` instead of the deprecated `convert` magick binary when thumbnailing
1313

14+
### Fixed
15+
16+
- symlinks were not followed while collecting works to build in the project directory
17+
1418
## [1.6.1] - 2024-04-27
1519

1620
### Changed
@@ -163,8 +167,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
163167

164168
- Initial release
165169

166-
[Unreleased]: https://github.com/ortfo/db/compare/v1.6.0...HEAD
167-
[1.6.1]: https://github.com/ortfo/db/-/releases/tag/v1.6.1
170+
[Unreleased]: https://github.com/ortfo/db/compare/v1.6.1...HEAD
171+
[1.6.1]: https://github.com/ortfo/db/compare/v1.6.0...v1.6.1
168172
[1.6.0]: https://github.com/ortfo/db/compare/v1.5.0...v1.6.0
169173
[1.5.0]: https://github.com/ortfo/db/compare/v1.4.1...v1.5.0
170174
[1.4.1]: https://github.com/ortfo/db/compare/v1.4.0...v1.4.1
@@ -179,5 +183,3 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
179183
[0.2.0]: https://github.com/ortfo/db/releases/tag/v0.2.0
180184

181185
[//]: # (C3-2-DKAC:GGH:Rortfo/db:Tv{t})
182-
183-
[unreleased]: https://github.com/ortfo/db/-/compare/v1.6.1...main

build.go

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -538,9 +538,15 @@ func (ctx *RunContext) ComputeProgressTotal() (workDirectories []fs.DirEntry, er
538538
// TODO: setting to ignore/allow “dotfolders”
539539

540540
dirEntryAbsPath := path.Join(ctx.DatabaseDirectory, dirEntry.Name())
541-
if !dirEntry.IsDir() {
541+
// Using stat to follow symlinks
542+
stat, err := os.Stat(dirEntryAbsPath)
543+
if err != nil {
544+
continue
545+
}
546+
if !stat.IsDir() {
542547
continue
543548
}
549+
544550
if dirEntry.Name() == "../" || dirEntry.Name() == "./" {
545551
continue
546552
}

0 commit comments

Comments
 (0)