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

shell32: Fix SHGetFileInfo function

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Minor
    • 0.4.8
    • Shell

    Description

      This patch fixes some bugs of SHGetFileInfoA/W function in shell32.

      Before patch

      shlfileop.c:195: Test failed: SHGetFileInfoA('' | 0) did not clear hIcon
      shlfileop.c:196: Test failed: SHGetFileInfoA('' | 0) did not clear szDisplayName[0]
      shlfileop.c:197: Test failed: SHGetFileInfoA('' | 0) did not clear szTypeName[0]
      shlfileop.c:233: Test failed: SHGetFileInfoA(c:\nonexistent | SHGFI_ATTRIBUTES) did not clear hIcon
      shlfileop.c:234: Test failed: SHGetFileInfoA(c:\nonexistent | SHGFI_ATTRIBUTES) did not clear szDisplayName[0]
      shlfileop.c:235: Test failed: SHGetFileInfoA(c:\nonexistent | SHGFI_ATTRIBUTES) did not clear szTypeName[0]
      shlfileop.c:243: Test failed: SHGetFileInfoA(c:\nonexistent | SHGFI_EXETYPE) should return 1, got 0x0
      shlfileop.c:337: Test failed: SHGetFileInfoA(CSIDL_DESKTOP, SHGFI_SYSICONINDEX|SHGFI_SMALLICON|SHGFI_PIDL) did not clear hIcon
      shlfileop.c:338: Test failed: SHGetFileInfoA(CSIDL_DESKTOP, SHGFI_SYSICONINDEX|SHGFI_SMALLICON|SHGFI_PIDL) did not clear szTypeName[0]
      shlfileop.c:363: Test failed: SHGetFileInfoW(CSIDL_DESKTOP, SHGFI_SYSICONINDEX|SHGFI_SMALLICON|SHGFI_PIDL) did not clear hIcon
      shlfileop.c:388: Test failed: dwAttributes not set
      shlfileop.c:397: Test failed: dwAttributes not set
      shlfileop.c:412: Test failed: Icon Index Modified
      shlfileop.c:419: Test failed: Icon Index Modified
      shlfileop.c:426: Test failed: Icon Index Modified
      shlfileop.c:441: Test failed: SHGFI_SYSICONINDEX|SHGFI_USEFILEATTRIBUTES|SHGFI_PIDL|SHGFI_SMALLICON|SHGFI_EXETYPE Failed
      shlfileop.c:450: Test failed: SHGFI_USEFILEATTRIBUTES|SHGFI_PIDL|SHGFI_SMALLICON|SHGFI_EXETYPE Failed
      shlfileop.c:451: Test failed: Icon Index Modified
      shlfileop.c:458: Test failed: Icon Index Modified
      shlfileop.c:472: Test failed: SHGFI_SYSICONINDEX|SHGFI_USEFILEATTRIBUTES|SHGFI_PIDL|SHGFI_EXETYPE Failed
      shlfileop.c:481: Test failed: SHGFI_USEFILEATTRIBUTES|SHGFI_PIDL|SHGFI_EXETYPE Failed
      shlfileop.c:482: Test failed: Icon Index Modified
      shlfileop.c:489: Test failed: Icon Index Modified
      shlfileop.c:572: Test failed: Failed to delete files
      shlfileop.c:573: Test failed: test1.txt should have been removed
      shlfileop.c:574: Test failed: test_5.txt should have been removed
      shlfileop.c:626: Test failed: Expected 1026 or ERROR_FILE_NOT_FOUND, got 3
      shlfileop.c:980: Test failed: CopyFileA should have fail with ERROR_ACCESS_DENIED
      shlfileop.c:1423: Test failed: Didn't expect aborted operations
      shlfileop.c:2323: Test failed: The file does not exist
      shlfileop.c:2325: Test failed: File is not removed, ErrorCode: 3
      shlfileop.c:2331: Test failed: The file does not exist
      shlfileop.c:2333: Test failed: File is not removed, ErrorCode: 3
      shlfileop: 657 tests executed (0 marked as todo, 33 failures), 0 skipped.

      After patch

      shlfileop.c:388: Test failed: dwAttributes not set
      shlfileop.c:397: Test failed: dwAttributes not set
      shlfileop.c:450: Test failed: SHGFI_USEFILEATTRIBUTES|SHGFI_PIDL|SHGFI_SMALLICON|SHGFI_EXETYPE Failed
      shlfileop.c:481: Test failed: SHGFI_USEFILEATTRIBUTES|SHGFI_PIDL|SHGFI_EXETYPE Failed
      shlfileop.c:572: Test failed: Failed to delete files
      shlfileop.c:573: Test failed: test1.txt should have been removed
      shlfileop.c:574: Test failed: test_5.txt should have been removed
      shlfileop.c:626: Test failed: Expected 1026 or ERROR_FILE_NOT_FOUND, got 3
      shlfileop.c:980: Test failed: CopyFileA should have fail with ERROR_ACCESS_DENIED
      shlfileop.c:1423: Test failed: Didn't expect aborted operations
      shlfileop.c:2323: Test failed: The file does not exist
      shlfileop.c:2325: Test failed: File is not removed, ErrorCode: 3
      shlfileop.c:2331: Test failed: The file does not exist
      shlfileop.c:2333: Test failed: File is not removed, ErrorCode: 3
      shlfileop: 657 tests executed (0 marked as todo, 14 failures), 0 skipped.

      Attachments

        1. shell32-shlfileop.patch
          5 kB
        2. shell32_main.c.patch
          4 kB
        3. shell32_main.c.patch
          5 kB
        4. 0001-improve-SHGetFileInfo.patch
          6 kB
        5. shlfileop-after.txt
          0.8 kB
        6. shlfileop-before.txt
          2 kB
        7. shlfileop-after.txt
          0.6 kB
        8. shfileop-after.txt
          0.5 kB

        Issue Links

          Activity

            People

              Ged Ged
              katayama_hirofumi_mz Katayama Hirofumi MZ
              Votes:
              3 Vote for this issue
              Watchers:
              9 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: