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

shell32: properties to file and folder shortcuts is missing target location

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 0.3.14, 0.4.4
    • Shell
    • None
    • Operating System: ReactOS
      Platform: x86 Hardware

    Description

      r54588
      Go to C:\ReactOS and make shortcut to file folder 'Inf'.
      Right click on 'Inf.lnk', properties. Target location in 'Shortcut' tab is missing.
      There is 'Command prompt.lnk' file in desktop and it haves correct target location.
      After investigate I have found out that it happens because there is trailing backslash at the end of pThis->sWorkDir.
      Using this code in shelllink.cpp

      /* target location */
      int wLen = wcslen(pThis->sWorkDir);
      wchar_t * wTrgtLocat;
      if (wLen == 3)

      { //Target located in drive e.g. C: wTrgtLocat = pThis->sWorkDir; }

      else

      { wchar_t* pLastChar = _tcschr(pThis->sWorkDir, '\0'); pLastChar--; if ( *pLastChar == '\\' ) //Make sure we don't to pass extra '\' e.g 'C:\ReactOS\' pThis->sWorkDir[wcslen(pThis->sWorkDir) - 1] = '\0'; const int ch = '\\'; wTrgtLocat = wcsrchr(pThis->sWorkDir, ch)+1; }

      SetDlgItemTextW(hwndDlg, 14007, wTrgtLocat);

      would fix things, but code seems like a hack.
      And it might be similar to http://www.reactos.org/bugzilla/show_bug.cgi?id=6571 and http://www.reactos.org/bugzilla/show_bug.cgi?id=6725

      Attachments

        Issue Links

          Activity

            People

              rafalh Rafa? Harabie?
              EDIJS EDIJS
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: