HaxeFoundation / HaxeFoundation/haxe

[hl] sys.FileSystem.exists(...) always returns `true` on MacOS for non-existing files

Open
#10,970 7 comments 1 reaction 0 assignees View on GitHub
platform-hl
Dominant language
Haxe
Stars
6.9k
Forks
715
Avg merge
2d 2h
Merged PRs (30d)
11

Description

The code
```haxe
trace(sys.FileSystem.exists("non-existing-file.txt"));
```
always returns `true` on MacOS with HashLink 1.13. It works fine on Windows and Linux.

I tried with Haxe 4.2.5 and the latest Haxe development build.

```sh
bash-3.2$ uname -a
Darwin Mac-1676552967785.local 21.6.0 Darwin Kernel Version 21.6.0: Mon Dec 19 20:44:01 PST 2022; root:xnu-8020.240.18~2/RELEASE_X86_64 x86_64

bash-3.2$ echo $OSTYPE
darwin21
```

@ncannasse is there any possible workaround?

Contributor guide

Open the contributing guide

Research direction

Start by locating the HashLink 1.13 implementation of sys.FileSystem.exists for macOS and compare it with the Windows and Linux implementations. Run the provided Haxe example on macOS to reproduce the result; done means a nonexistent file returns false consistently on macOS.

Written by the indexing model from the issue text.

Assessment

Tech stack
macos
Domain
operating-systems
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.