Ticket Change Details
Not logged in
Overview

Artifact ID: 6c5c71528cdd4990182549af24f2859eda686ac3
Ticket: 36cb6b45fd9d31f6bc4bd4ad87f18aad50e5bce9
in windows, fossil allows addition of the same file twice
User & Date: anonymous 2010-01-20 19:26:25
Changes

  1. Appended to comment:
    
    
    <hr><i>anonymous claiming to be Jose F. Gimenez added on 2010-01-20 19:26:25:</i><br>
    rwilson, there is an easier way to get the real filename in windows. Check this C function:
    <verbatim>
       BOOL GetRealFilename( const char * szFilename, char * szRealFilename )
       {
          char szTempFilename[ MAX_PATH ];
          if( GetShortPathName( szFilename, szTempFilename, MAX_PATH ) )
             if( GetLongPathName( szTempFilename, szRealFilename, MAX_PATH ) )
                return TRUE;
          return FALSE;
       }
    </verbatim>
    Also, it allows to check the existance of a file, since it returns FALSE if the file doesn't exist.
    
    But that doesn't fix the problem at 100%. You could rename a file in your working directory, changing only case, and get again in a trouble. So, the check have to be done in the repository.
    
    The drh fix solves the most cases, although it doesn't deal with non ascii chars. Thanks, however!