BaldissaraMatheus / Tasks.md

A self-hosted, Markdown file based task management board
https://hub.docker.com/r/baldissaramatheus/tasks.md
MIT License
765 stars 32 forks source link

Non-directory files in "tasks" folder causes api calls to fail #98

Closed civilblur closed 1 month ago

civilblur commented 1 month ago

In the root of the tasks folder, when any file that isn't a directory is included, the frontend will fail its api calls when editing a card, due to the scandir error.

[Error: ENOTDIR: not a directory, scandir '/tasks/.DS_Store'] {
  errno: -20,
  code: 'ENOTDIR',
  syscall: 'scandir',
  path: '/tasks/.DS_Store'
}

Understandably, the tasks folder shouldn't be occupied by anything else but folders, however, I stumbled upon this issue when navigating the tasks using macOS, which adds a hidden .DS_Store file.

The issue isn't limited to dot files, but anything that isn't a directory. It can be reproduced by adding any type of file to the root of the tasks folder.

BaldissaraMatheus commented 1 month ago

Thanks for reporting the issue, I don't have any macOS here so I would never know Just merged a PR with the fix, new release should be available in a few minutes

civilblur commented 1 month ago

Thanks for reporting the issue, I don't have any macOS here so I would never know Just merged a PR with the fix, new release should be available in a few minutes

Tested, and it's working well. Thanks a bunch!