-
Notifications
You must be signed in to change notification settings - Fork 36
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
Deleteing file fails after Compressor.decompress() #42
Comments
i can not replicate this on my system. i wrote a junit test: @Test
public void test() throws Exception {
File source = new File("/tmp/fake.gz");
assertTrue(source.createNewFile());
Compressor compressor = CompressorFactory.createCompressor(source);
try {
compressor.decompress(source, new File(source.getParent()));
} catch (Exception e) {
assertTrue(source.exists());
assertTrue(source.delete());
assertFalse(new File("/tmp/fake.gz").exists());
}
} and it runs through properly. can you specify what environment you working are in?
|
Thank you for your quick response. I've done more testing and still receive the same error. Maybe it is a problem with the Java version? Operating System: Windows 7 I've simplified the execution to this:
|
Simple and clean API but I have an issue.
I am using a test file named fileNane.gz. It is not a compressed file but a text file with the .gz extension. This file seems to be locked by a process when trying to delete.
compressor.decompress(f, new File(f.getParent()) ) throws an exception as expected but I cannot delete the file.
Here is my code:
The text was updated successfully, but these errors were encountered: