mirror of https://github.com/apache/jclouds.git
Merge pull request #610 from andrewgaul/filesystem-overwrite-check
Do not check for equality on overwrites
This commit is contained in:
commit
f836ff5258
|
@ -199,15 +199,11 @@ public class FilesystemStorageStrategyImpl implements FilesystemStorageStrategy
|
|||
filesystemContainerNameValidator.validate(container);
|
||||
filesystemBlobKeyValidator.validate(blobKey);
|
||||
File outputFile = getFileForBlobKey(container, blobKey);
|
||||
if (payload.getRawContent().equals(outputFile)){
|
||||
// we shouldn't re-copy the same contents
|
||||
return;
|
||||
}
|
||||
FileOutputStream output = null;
|
||||
try {
|
||||
Files.createParentDirs(outputFile);
|
||||
if (payload.getRawContent() instanceof File)
|
||||
Files.copy(File.class.cast(payload.getRawContent()), outputFile);
|
||||
Files.copy((File) payload.getRawContent(), outputFile);
|
||||
else {
|
||||
output = new FileOutputStream(outputFile);
|
||||
payload.writeTo(output);
|
||||
|
|
Loading…
Reference in New Issue