I investigated this issue prior to release and took my best shot at resolving the issue. I spent the better part of a day trying to figure out how to come up with an elegant fix and unfortunately I was not able to do so. Every possible solution that I could come up with would only result in other defects and incorrect behavior. I apologize for any inconvenience this issue may cause.
If you are interested in the details on why this defect proved to be so difficult, read on. Warning, it may get a bit technical and it may be difficult to even explain effectively.
This behavior (case sensitivity on rename) was introduced on Windows Vista in order to fix another issue discovered while making ACDSee 9 compatible with Windows Vista. While Microsoft tries diligently to make a newer OS backwards compatible with previous versions, there are cases where slight changes to operating system functions (Platform SDK) change. These subtle changes sometimes make things challenging for Independent Software Vendors such as us.
On Windows XP, when a user tries to rename a folder to the exact name as an existing folder, the Platform SDK displays an error message to the user and the function fails. You can try this in ACDSee as well as Windows Explorer (on XP). However, Windows Vista allows users to rename a folder to the same name as a folder that already exists and give the user the ability to merge the two folders. So now on Vista, the same Platform SDK call does not display an error message and return an error to the calling application. Instead the SDK call tries to merge the contents of the two folders into one without reporting any error to the calling application. This behavior gives ACDSee some pain and puts in into a fairly bad state, especially when trying to keep items from getting orphaned in the database. The folder tree and database would get out of sync with the OS since there are no longer two folders with distinct names. Since we don't know the merge occurred, we have no idea that we should delete a folder from the DB and remove it from the folder tree.
In order to prevent ACDSee from getting into this bad state, the fix employed (on Vista only) is to check and see if the destination file exists prior to doing the rename. This way we can prevent any chance of the OS doing a folder merge without our knowledge. If a folder already exists with the destination name, we display the error message ourselves rather than relying on the OS to do it.
The only problem with this fix, as you have discovered, is that the check for existence is case insensitive. This comes as no surprise as file/folder names on Windows are case insensitive. Since file/folder names are case insensitive, the check for 'ABc' existing prior to the rename returns TRUE since 'Abc' exists.
I spent a few hours looking for a better fix for original issue, but I couldn't think of anything that didn't involve a risk factor higher than I was willing to accept. If Vista gave us an error when trying to do the rename (like XP does) the original issue would not occur, and this bug wouldn't exist! Alas... no such luck.
Posted On September 10, 2007 - 02:26 PM (2 years ago) (
Permalink to this post)