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

Missing filename quoting in Windows Batch #70

Open
Tomalak opened this issue Jul 20, 2018 · 1 comment
Open

Missing filename quoting in Windows Batch #70

Tomalak opened this issue Jul 20, 2018 · 1 comment

Comments

@Tomalak
Copy link

Tomalak commented Jul 20, 2018

File existence checks should use quotes in Windows (when the filename uses spaces). Currently

if (exists("file 2.txt")) {
  println("file exists");
}

compiles to

if exist file 2.txt (
  echo file exists
)

but it should compile to

if exist "file 2.txt" (
  echo file exists.
)

In fact, quoting file names is never wrong, so simply doing it always won't break stuff.

@Tomalak Tomalak changed the title filname quoting in Windws Batch Missing filename quoting in Windws Batch Jul 20, 2018
@Tomalak Tomalak changed the title Missing filename quoting in Windws Batch Missing filename quoting in Windows Batch Jul 20, 2018
@Tomalak
Copy link
Author

Tomalak commented Jul 20, 2018

damn, two typos in the title, that's a sad record...

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

1 participant