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

Desk.cpl : Background selection should only accept image (not lnk)

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Minor
    • None
    • Wine
    • None

    Description

      Using reactos-bootcd-0.4.15-dev-4914-g2220e56-x86-gcc-lin-dbg 

      When you whant to add a background image and select a shortcut (.lnk) Desk.cpl does not resolve the .lnk and check target extension BUT directly add the .lnk to the list

      Either .lnk should NOT be accepted OR the target should be resolved, checked, and added only if relevant.

      Maybe a problem from the FileBrowser common dialog ?

      Windows XPSP3 : lnk not accepted (filtered out by browse dialog)

      Cause : in dll/cpl/desk/background.c ( OnBrowseButton : https://git.reactos.org/?p=reactos.git;a=blob;f=dll/cpl/desk/background.c#l609 ) it shall be checked that the extension of ofn.lpstrFileTitle is still valid in GdipGetSupportedFileExtensions

      In particular wrt https://learn.microsoft.com/en-us/windows/win32/api/commdlg/ns-commdlg-openfilenamea

      In the case of a shortcut, if no filter is set, GetOpenFileName and GetSaveFileName retrieve the name of the .lnk file, not its target. This behavior is the same as setting the OFN_NODEREFERENCELINKS flag in the Flags member. To retrieve a shortcut's target without filtering, use the string "All Files\0*.*\0\0". 

      Or, see CORE-18955 where it seems that in 2K3 the .lnk files are not listed in the Browse for file common dialog

      Attachments

        1. log.txt
          9 kB
        2. image-2023-04-30-18-30-17-602.png
          image-2023-04-30-18-30-17-602.png
          44 kB
        3. background.png
          background.png
          44 kB
        4. background.png
          background.png
          330 kB

        Issue Links

          Activity

            People

              Unassigned Unassigned
              KRosUser KRosUser
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated: