In RS I compress a REALDatabase file using ZipMBS and save this file to the Documents folder. If I open this zip file manually, by double-clicking on it in Finder, then it unzips as expected. The Zip file is ok at this point of the process.
But in my RS program, I call an AppleScript to open Mail and attach the zip file to a new mail.
The Realbasic code:
Dim theSubject As String = "Backup of database " + dbFileNam
Dim theBody As String = "Database Last Modification Date : " + d.SQLDateTime
Dim theAttachment As String = SpecialFolder.Documents.Child(fName).NativePath
OSXSendMail(theSubject, theBody, theAttachment)
The AppleScript code:
on run {theSubject, theBody, theAttachment}
tell application "Mail"
set newMessage to make new outgoing message with properties {visible:true, subject:theSubject, content:theBody & return & return}
tell content of newMessage
make new attachment with properties {file name:theAttachment} at after the last paragraph
end tell
activate
end tell
end run
It seems to work as expected, but when I drag the attachment to the desktop (or also into the Documents folder) then I can no longer unzip this file by simply doubleclicking it. The error:

However, I got "The Archive Browser" from the AppStore and with that utility it is possible to safely extract the original file.
But I need a solution which does not require the user to purchase a third party expander for zip files.
Somehow the AppleScript seems to alter the attachment. So maybe someone knows a safe way of attaching a RealSQLDatabase file to a mail and send it?