XCopyFile Read-Only Bug Still Not Fixed?
I have recently had a number of installations failing to update files at a number of client sites.
It appears to succeed but a number of files were not overwritten. I eventually discovered it was the set of files I use XCopyFile to install and all the existing destination files were read-only.
XCopyFile returns the success result code in this situation but does not actually copy the file. I would have thought it should call the OnFileReadOnly event or at least return an error code.
The installation was written in version 6.x so I thought an upgrade to 7.0 would fix it - wrong!
I had to test this a number of times to prove it didn't work because I couldn't believe InstallShield would ignore this bug.
This is listed on InstallSite.org under the 6.x bugs:
Created: 2000-12-08 Last update: 2001-09-13 InstallShield Tracking Number: 1-3PYX1
Does anyone else have the same problem?
You are correct that this is still an issue in ISPro 7.00, as a workaround you will have to check the read-only state of the file(s) before doing the copy.
We are considering adding the ability for XCopyFile to trigger error events, however I'm not sure exactly when this might be available.
InstallShield Software Corporation
Allowing XCopyFile (and CopyFile) to trigger standard error events would be great - I have already filled out the feature request form...!
In the meantime, please could you return an error code from these functions to indicate a read-only destination file?
Last edited by Michael Forshaw; 09-24-2002 at 02:36 AM.
Does anyone know if XCopyFile triggers any standard error events?
I'm using XCopyFile to copy files onto a local folder and when a read-only file is encountered, and I have the COMP_NORMAL flag set, it seems to over-write the file without trigerring the OnFileReadOnly.
Also, I have noticed that XCopyFile does not trigger the OnInstallingFile event either.
Is this expected behavior?