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

[Windows] Fix the special file check for folder icon

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 4.0.0
    • Fix Version/s: 4.3.0
    • Component/s: Local client
    • Environment:
      Windows

      Description

      Issue

      On Windows, instead of simply checking for file existance, we also try to read desktop.ini to get the version. This was a hack introduced in NXDRIVE-1256 with that commit. And for some customers, it may fail on:

      Traceback (most recent call last):
        File "nxdrive\__main__.py", line 98, in main
        File "nxdrive\commandline.py", line 498, in handle
        File "nxdrive\commandline.py", line 505, in get_manager
        File "nxdrive\manager.py", line 171, in __init__
        File "nxdrive\manager.py", line 367, in load
        File "nxdrive\engine\engine.py", line 191, in __init__
        File "nxdrive\utils.py", line 539, in wrapper
        File "nxdrive\engine\engine.py", line 966, in _set_root_icon
        File "nxdrive\client\local_client.py", line 231, in has_folder_icon
        File "pathlib.py", line 1207, in read_text
        File "C:\Python37-32\lib\codecs.py", line 322, in decode
      UnicodeDecodeError: 'utf-8' codec can't decode byte 0xff in position 0: invalid start byte
      

      Fix

      The fix is quite simple: remove those hacky lines and just check for file existance.

        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 - 30 minutes
                  30m