Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IsDirectory is not reliable. Use lfs? #13

Closed
Ismoh opened this issue Dec 20, 2021 · 1 comment
Closed

IsDirectory is not reliable. Use lfs? #13

Ismoh opened this issue Dec 20, 2021 · 1 comment
Assignees
Labels
bug Something isn't working. This will increase PATCH version number, when merged into develop.

Comments

@Ismoh
Copy link
Owner

Ismoh commented Dec 20, 2021

function fu.IsDirectory(name)
-- https://stackoverflow.com/a/21637809/3493998
return (fu.Exists(name) and not fu.IsFile(name))
end

    TestFileUtil.testIsDirectory ... 

file_util.lua | Directory nonexistingdirectory exists = false
file_util.lua | Path 'nonexistingdirectory' does not exist!
file_util.lua | Is the directory a file? nonexistingdirectory is_file = false
file_util.lua | Directory /home/runner/work/NoitaMP/NoitaMP exists = true
file_util.lua | Is the directory a file? /home/runner/work/NoitaMP/NoitaMP is_file = true
FAIL
...r/work/NoitaMP/NoitaMP/.testing/tests/file_util_test.lua:144: expected: true, actual: false
    TestFileUtil.testIsFile ... 
@Ismoh Ismoh added the bug Something isn't working. This will increase PATCH version number, when merged into develop. label Dec 20, 2021
@Ismoh
Copy link
Owner Author

Ismoh commented Dec 24, 2021

Fixed in #15

@Ismoh Ismoh closed this as completed Dec 24, 2021
@Ismoh Ismoh self-assigned this Jan 24, 2022
@Ismoh Ismoh added this to NoitaMP Nov 22, 2022
@Ismoh Ismoh moved this to ✅ Done in NoitaMP Nov 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working. This will increase PATCH version number, when merged into develop.
Projects
Status: Done
Development

No branches or pull requests

1 participant