Details
-
Bug
-
Resolution: Fixed
-
P2: Important
-
None
-
6.8.0
-
None
-
client: Windows 11 24H2 server:Ubuntu 20.04.6 LTS
-
-
2defca418 (dev), ce820174e (6.9), 443758964 (6.8), 0aaf43ac2 (tqtc/lts-6.5)
-
Foundation Sprint 123
Description
If a case-sensitive filesystem is mounted case-insensitive (the default) via NFS on Windows, QFile::rename() will delete the source if the path matches the destination (case-insensitively).
This is a problem, since the most common way to mount NFS exports (typically from Linux) is case-insensitively since it is more compatible with Windows applications, for example.
mount -o anon \\192.168.0.1\mnt\share Z:
Windows Explorer refuses to do such renames, instead we get a dialog: "Rename file: The source and destination file names are the same". Which implies it is possible to detect this condition in Qt.
To work around the problem, we can mount case-sensitive:
mount -o anon casesensitive=yes \\192.168.0.1\mnt\share Z:
Attachments
For Gerrit Dashboard: QTBUG-132785 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
617278,3 | QFile::rename: error out if overwrite fails when changing case on case-insensitive filesystems | dev | qt/qtbase | Status: MERGED | +2 | 0 |
618295,2 | QFile::rename: error out if overwrite fails when changing case on case-insensitive filesystems | 6.9 | qt/qtbase | Status: MERGED | +2 | 0 |
618382,2 | QFile::rename: error out if overwrite fails when changing case on case-insensitive filesystems | 6.8 | qt/qtbase | Status: MERGED | +2 | 0 |
618459,2 | QFile::rename: error out if overwrite fails when changing case on case-insensitive filesystems | tqtc/lts-6.5 | qt/tqtc-qtbase | Status: MERGED | +2 | 0 |