cifs : if restoring rather than creating, should replace empty contents.

+ new unit test

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@47458 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Mark Rogers
2013-03-01 17:51:05 +00:00
parent 583ddc80ee
commit 0a13a1f7aa
3 changed files with 167 additions and 4 deletions

View File

@@ -2320,9 +2320,7 @@ public class ContentDiskDriver2 extends AlfrescoDiskDriver implements ExtendedD
ContentData targetData = (ContentData)targetProp;
logger.debug("copy the existing mimetype");
prop = ContentData.setMimetype(data, targetData.getMimetype());
}
}
}
}
@@ -2330,8 +2328,10 @@ public class ContentDiskDriver2 extends AlfrescoDiskDriver implements ExtendedD
}
else
{
// No content to set
logger.debug("no content to save");
// No content to set - need to remove old content
ContentWriter writer = contentService.getWriter(targetNodeRef, ContentModel.PROP_CONTENT, true);
writer.putContent("");
}
}