Uploaded image for project: 'Nuxeo Drive '
  1. Nuxeo Drive
  2. NXDRIVE-1471

Do not alter the filename extension guessed from a Note

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.1.113
    • Fix Version/s: 4.0.3
    • Component/s: Synchronizer
    • Tags:
    • Backlog priority:
      550
    • Sprint:
      nxDrive 10.10.4
    • Story Points:
      1

      Description

      We currently have this kind of code to guess the file name from a Note:

      ext = ".txt"
      mime_type = props.get("note:mime_type")
      if mime_type == "text/html":
          ext = ".html"
      elif mime_type == "text/xml":
          ext = ".xml"
      elif mime_type == "text/x-web-markdown":
          ext = ".md"
      name = props["dc:title"]
      if not name.endswith(ext):
          name += ext
      

      It has worked for years but it is not the good behavior. We should not try to guess and alter the filename. See the linked SupCom for a real life bad example.

      Fix

      The fix is to not alter the file name. Just use props["dc:title"].

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 2 hours, 30 minutes
                  2h 30m