Uploaded image for project: 'Picard'
  1. Picard
  2. PICARD-3013

Case only renaming broken on case-insensitive filesystems

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Normal Normal
    • 2.13
    • 2.8.0rc1, 2.12.3
    • File Move & Rename
    • None
    • Windows 10
      case insensitive file systems

      Renaming files fails on Windows 10 if only the casing of the file would change. The filename remains the same without casing change.

      Case sensitive renaming was implemented in PICARD-1991 and PICARD-1991, but it broke when implementing long path support in PICARD-2076.

      The relevant change is https://github.com/metabrainz/picard/commit/5037ce993551d739689095fbea323bcc4ac6c3f0#diff-8e9e6145ecc7e912b2d643f5064e6f196d3668bd010ffa6037775232c2aba236L520 . This is now calling "normpath" on the new filename, which in return calls os.path.realpath. This resolves the filename to the actual casing.

      The issue might apply to other case insensitive file systems as well, but is only confirmed for Windows 10 for now and does not seem to happen on Windows 7 according to https://community.metabrainz.org/t/strange-behavior-with-file-rename/733709

          Loading...
          Uploaded image for project: 'Picard'
          1. Picard
          2. PICARD-3013

          Case only renaming broken on case-insensitive filesystems

            • Icon: Bug Bug
            • Resolution: Fixed
            • Icon: Normal Normal
            • 2.13
            • 2.8.0rc1, 2.12.3
            • File Move & Rename
            • None
            • Windows 10
              case insensitive file systems

              Renaming files fails on Windows 10 if only the casing of the file would change. The filename remains the same without casing change.

              Case sensitive renaming was implemented in PICARD-1991 and PICARD-1991, but it broke when implementing long path support in PICARD-2076.

              The relevant change is https://github.com/metabrainz/picard/commit/5037ce993551d739689095fbea323bcc4ac6c3f0#diff-8e9e6145ecc7e912b2d643f5064e6f196d3668bd010ffa6037775232c2aba236L520 . This is now calling "normpath" on the new filename, which in return calls os.path.realpath. This resolves the filename to the actual casing.

              The issue might apply to other case insensitive file systems as well, but is only confirmed for Windows 10 for now and does not seem to happen on Windows 7 according to https://community.metabrainz.org/t/strange-behavior-with-file-rename/733709

                    outsidecontext Philipp Wolfer
                    outsidecontext Philipp Wolfer
                    Votes:
                    0 Vote for this issue
                    Watchers:
                    1 Start watching this issue

                      Created:
                      Updated:

                        Version Package
                        2.13

                          outsidecontext Philipp Wolfer
                          outsidecontext Philipp Wolfer
                          Votes:
                          0 Vote for this issue
                          Watchers:
                          1 Start watching this issue

                            Created:
                            Updated:

                              Version Package
                              2.13