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

util.fileExists return 0 #264

Open
zak-45 opened this issue Dec 6, 2024 · 1 comment
Open

util.fileExists return 0 #264

zak-45 opened this issue Dec 6, 2024 · 1 comment

Comments

@zak-45
Copy link

zak-45 commented Dec 6, 2024

  • OS: win11
  • Version 1.9.24

Describe the bug
util.fileExists report zero

To Reproduce

Create a file by uisng util.writeFile.
Test if file exist.

        var data = "super";
        util.writeFile("myfile.txt", data, true);
        script.log(util.fileExists("myfile.txt"));

Expected behavior
util.fileExists should report 1

Additional context
If you provide absolute path for the file name, util.fileExists report 1.
This should follow the same logic as the file creation to determine the path.

@benkuper
Copy link
Owner

benkuper commented Dec 6, 2024

found it, fixed it for next release (likely 2.x) thanks !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants