Projucer --encode-binary requires target file to already exist

Either I’m completely misunderstanding this, or this line of code is wrong as it throws an exception if the target file doesn’t exist. I was expecting it to create the target file - hence it being the target. :slight_smile:

Seems the behaviour is in line with the documentation of this method.

I don’t think @jimc complains that the function is wrong, but the behavior of the Projucer is problematic. For the target it shouldn’t use that function, it should create the target if it doesn’t exist. Right now you need to create an empty dummy file or the Projucer errors out.

1 Like

Yep, you’re right, my bad, read it too quickly. Thanks for mentioning.

Yeah - the problem is the encode-binary option only works if you are overwriting a file, but as a user of the feature you’d expect it to create the file if it didn’t exist.

Thanks for reporting. A fix has been applied.

2 Likes

Cheers. Confused me for a bit that :slight_smile:

1 Like