This is possibly related to:
When unzipping a zip file into an existing directory and attempting to overwrite existing files with the overwrite flag, the files are not overwritten. This has broken the upgrade command in CommandBox.
I have attached a zip file that has a small test case. The test case uses a CommandBox Task Runner. Unzip the folder and run box task run to execute the task runner. I'm sure this can easily be reworked into a normal test case. The task runner was just quick and easy to test it from the command line.
Run the task which unzips the myZip.zip archive into the target folder. Then modify the myFile.txt which was created in the target folder. Your changes will not be overwritten as they should be.
Is the behavior for overwrite supposed to overwrite whole directories if they exist? Does it makes sense to adjust the fix to this?
if(target.exists() && overwrite) target.delete();
if(target.exists() && !target.isDirectory() && overwrite) target.delete();
I’m testing with 184.108.40.206 on Java 8.
Or in my case I’m using the entrypath attribute. Would it make sense that it only overwrites wipes out directories in the specified entrypath under the destination.
can you create a new ticket and link it to this one?