You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I followed the code to the plexus archiver, where the extractFile method in AbstractUnArchiver.java is just overwriting the file without deleting it first if it exists.
Now, I'm not sure if it is a bug, an enhancement or even desired behavior, that read-only target files are not overwritten? The directory that contains it is writable, so deleting and creating a new file would work.
Would you consider something like adding ' if (f.exists()) { f.delete() } ' at around line 350? Or would that be undesired?
The text was updated successfully, but these errors were encountered:
From what I can gather tools like tar and unzip first delete the existing file when overriding files. I think first deleting the file should be ok for Plexus Archiver as well.
In my maven build the unpack extension is used to extract some packages like zulu or postgres, which contain read-only files (e.g. -r-xr-xr-x pgsql/lib/libssl.so.1.0.0). When re-building, I get the WARNING Unable to expand to file .../pgsql/lib/libssl.so.1.0.0 . (I created https://stackoverflow.com/questions/62836984/how-to-make-maven-unpack-overwrite-read-only-files for that)
I followed the code to the plexus archiver, where the extractFile method in AbstractUnArchiver.java is just overwriting the file without deleting it first if it exists.
Now, I'm not sure if it is a bug, an enhancement or even desired behavior, that read-only target files are not overwritten? The directory that contains it is writable, so deleting and creating a new file would work.
Would you consider something like adding ' if (f.exists()) { f.delete() } ' at around line 350? Or would that be undesired?
The text was updated successfully, but these errors were encountered: