[PR #4261] [MERGED] Fix .ignore file causing ignores outside the directory #4198

Closed
opened 2026-04-25 00:18:45 +02:00 by adam · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/advplyr/audiobookshelf/pull/4261
Author: @nschum
Created: 5/5/2025
Status: Merged
Merged: 5/10/2025
Merged by: @advplyr

Base: masterHead: fix-ignore-parent


📝 Commits (1)

  • 3cc5274 Fix .ignore file causing ignores outside the directory

📊 Changes

2 files changed (+14 additions, -4 deletions)

View changed files

📝 server/utils/fileUtils.js (+1 -1)
📝 test/server/utils/fileUtils.test.js (+13 -3)

📄 Description

Brief summary

The .ignore file handling based on prefix was incorrect in edge cases.

Which issue is fixed?

The file "a/.ignore" should only cause the directory "a" to be ignored.
However, it also ignores all files starting with "a".

In-depth Description

After this fix, it will only ignore paths starting with "a/".

How have you tested this?

Added unit test.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/advplyr/audiobookshelf/pull/4261 **Author:** [@nschum](https://github.com/nschum) **Created:** 5/5/2025 **Status:** ✅ Merged **Merged:** 5/10/2025 **Merged by:** [@advplyr](https://github.com/advplyr) **Base:** `master` ← **Head:** `fix-ignore-parent` --- ### 📝 Commits (1) - [`3cc5274`](https://github.com/advplyr/audiobookshelf/commit/3cc527484de6e297341b534c7654fcafcf667456) Fix .ignore file causing ignores outside the directory ### 📊 Changes **2 files changed** (+14 additions, -4 deletions) <details> <summary>View changed files</summary> 📝 `server/utils/fileUtils.js` (+1 -1) 📝 `test/server/utils/fileUtils.test.js` (+13 -3) </details> ### 📄 Description ## Brief summary The .ignore file handling based on prefix was incorrect in edge cases. ## Which issue is fixed? The file "a/.ignore" should only cause the directory "a" to be ignored. However, it also ignores all files starting with "a". ## In-depth Description After this fix, it will only ignore paths starting with "a/". ## How have you tested this? Added unit test. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
adam added the pull-request label 2026-04-25 00:18:45 +02:00
adam closed this issue 2026-04-25 00:18:45 +02:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/audiobookshelf#4198