Uploaded image for project: 'Core ReactOS'
  1. Core ReactOS
  2. CORE-11150

vfatUpdateFCB does not update 8.3 filename

    XMLWordPrintable

Details

    Description

      Original issue:

      C:\>dir \ReactOS\system32\advp*|find "advp"
      04/22/2016  01:36 AM           104,960 advpack.dll
       
      C:\>temp\vcredist.exe
       
      C:\>dir \ReactOS\system32\advp*|find "advp"
      04/22/2016  01:36 AM           104,960 advpack.dll
      02/14/2000  12:24 PM            77,520 advpack.dll

      I was able to reduce this to: When a file is in use, and it is renamed and the attributes are changed, it becomes it's original filename again. In case of a long filename, it will be renamed to it's short filename. See RenFileBug.c for a testcase.

      It is caused by the cached entry of the fcb table not having updated the 8.3 filename on a rename. But when the attributes are changed, the unmodified 8.3 filename is written back to disk.

      The attached patch fixes this issue for me. Two remarks though:

      • It introduces duplicate code, I have copied the main part shamelessly from the vfatUpdateFCB function.
      • The if is not required, I'm not sure it is better to leave it out.

      Attachments

        1. RenFileBug.c
          2 kB
        2. fcb.c.patch
          2 kB
        3. cached_entry_update.diff
          4 kB

        Activity

          People

            Heis Spiter Pierre Schweitzer
            wimh wimh
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: