mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2026-07-12 12:21:34 +00:00
Fix issues with symlink directories
This commit is contained in:
parent
82aec5f60c
commit
2f89fd17b1
5 changed files with 18 additions and 8 deletions
|
|
@ -66,7 +66,8 @@ describe('fileUtils', () => {
|
|||
// Stub fs.readdir
|
||||
readdirStub = sinon.stub(fs, 'readdir')
|
||||
readdirStub.callsFake((path, callback) => {
|
||||
const contents = mockDirContents.get(path)
|
||||
const normalizedPath = path.replace(/\/+$/, '')
|
||||
const contents = mockDirContents.get(normalizedPath)
|
||||
if (contents) {
|
||||
callback(null, contents)
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue