Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8088064

Enhance Launcher to Support Long File Names

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P2
    • Resolution: Fixed
    • Affects Version/s: 9
    • Fix Version/s: 9
    • Component/s: deploy
    • Subcomponent:
    • Verification:
      Verified

      Description

      For example in FilePath.cpp:

      TString FilePath::FixPathForPlatform(const TString FileName) {
             TString result = FileName;
             size_t position = result(_T("\\?\""));

              if (position == TString::npos) {
                  result = TString(_T("\\?\"")) + result;
              }

              return result;
      }

      bool FilePath::DeleteFile(const TString FileName) {
          bool result = false;

          if (FileExists(FileName) == true) {
      #ifdef WINDOWS
              // To extend to long filenames prepend \\?\" to the filename.
              TString lFileName = FixPathForPlatform (FileName);
              FileAttributes attributes(lFileName);

              if (attributes.Contains(faReadOnly) == true) {
                  attributes.Remove(faReadOnly);
              }

              result = ::DeleteFile(lFileName.data()) == TRUE;
      #endif //WINDOWS
      #ifdef POSIX
              if (unlink(StringToFileSystemString(FileName)) == 0) {
                  result = true;
              }
      #endif //POSIX
          }

          return result;
      }

        Attachments

          Activity

            People

            Assignee:
            vdrozdov Victor Drozdov (Inactive)
            Reporter:
            cbensen Chris Bensen (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Imported: