mirror of https://github.com/apache/jclouds.git
Close OutputStream during filesystem putBlob
This commit is contained in:
parent
e9cff5e17c
commit
322d37897e
|
@ -208,8 +208,10 @@ public class FilesystemStorageStrategyImpl implements FilesystemStorageStrategy
|
|||
Files.createParentDirs(outputFile);
|
||||
if (payload.getRawContent() instanceof File)
|
||||
Files.copy(File.class.cast(payload.getRawContent()), outputFile);
|
||||
else
|
||||
payload.writeTo(new FileOutputStream(outputFile));
|
||||
else {
|
||||
output = new FileOutputStream(outputFile);
|
||||
payload.writeTo(output);
|
||||
}
|
||||
} catch (IOException ex) {
|
||||
if (outputFile != null) {
|
||||
outputFile.delete();
|
||||
|
|
Loading…
Reference in New Issue