Fixed problem where the MS Word renames during document save lose the original mime-type.

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@2128 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Gary Spencer
2006-01-17 14:47:38 +00:00
parent 4408850b7a
commit 08b0f1f668

View File

@@ -507,12 +507,13 @@ public class CifsHelper
String mimetype = mimetypeService.guessMimetype(tempName);
oldContentData = ContentData.setMimetype(null, mimetype);
}
ContentData newContentData = fileToMoveInfo.getContentData();
if (newContentData == null)
{
String mimetype = mimetypeService.guessMimetype(newName);
newContentData = ContentData.setMimetype(null, mimetype);
}
// Reset the mime type
String mimetype = mimetypeService.guessMimetype(newName);
newContentData = ContentData.setMimetype(newContentData, mimetype);
nodeService.setProperty(tempNodeRef, ContentModel.PROP_CONTENT, newContentData);
nodeService.setProperty(nodeToMoveRef, ContentModel.PROP_CONTENT, oldContentData);