QSettings/QConfFile: Fix reading on NTFS symbolic links
The code checked on QFileInfo::size() whether the file had any content. The check failed for NTFS symbolic links since QFileInfo::size() returns 0 for them. Workaround by using QFile::size() instead. Task-number: QTBUG-64121 Change-Id: I303414b5a560d1ed8fbc53d969e53f9e2899ae5c Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
parent
11a2e0aa2d
commit
22ec92a201
@ -1451,7 +1451,7 @@ void QConfFileSettingsPrivate::syncConfFile(QConfFile *confFile)
|
||||
Files that we can't read (because of permissions or
|
||||
because they don't exist) are treated as empty files.
|
||||
*/
|
||||
if (file.isReadable() && fileInfo.size() != 0) {
|
||||
if (file.isReadable() && file.size() != 0) {
|
||||
bool ok = false;
|
||||
#ifdef Q_OS_MAC
|
||||
if (format == QSettings::NativeFormat) {
|
||||
|
Loading…
Reference in New Issue
Block a user