diff options
author | Oswald Buddenhagen <oswald.buddenhagen@nokia.com> | 2010-04-20 15:01:42 (GMT) |
---|---|---|
committer | Oswald Buddenhagen <oswald.buddenhagen@nokia.com> | 2010-04-26 13:43:23 (GMT) |
commit | 9b3dceaac61a48a4524e586705c50637f62993d2 (patch) | |
tree | ed82636c2934835a82acaf224fc2615636729d2c | |
parent | 1c1f655d82e4af2ff98970472f687e55216e9fcf (diff) | |
download | Qt-9b3dceaac61a48a4524e586705c50637f62993d2.zip Qt-9b3dceaac61a48a4524e586705c50637f62993d2.tar.gz Qt-9b3dceaac61a48a4524e586705c50637f62993d2.tar.bz2 |
save a QFile::encodeName()
Reviewed-by: joao
-rw-r--r-- | src/corelib/io/qfsfileengine_unix.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/corelib/io/qfsfileengine_unix.cpp b/src/corelib/io/qfsfileengine_unix.cpp index 1415e44..5762d94 100644 --- a/src/corelib/io/qfsfileengine_unix.cpp +++ b/src/corelib/io/qfsfileengine_unix.cpp @@ -122,7 +122,7 @@ void QFSFileEnginePrivate::setSymbianError(int symbianError, QFile::FileError de Returns the stdlib open string corresponding to a QIODevice::OpenMode. */ -static inline QByteArray openModeToFopenMode(QIODevice::OpenMode flags, const QString &fileName) +static inline QByteArray openModeToFopenMode(QIODevice::OpenMode flags, const QByteArray &fileName) { QByteArray mode; if ((flags & QIODevice::ReadOnly) && !(flags & QIODevice::Truncate)) { @@ -130,7 +130,7 @@ static inline QByteArray openModeToFopenMode(QIODevice::OpenMode flags, const QS if (flags & QIODevice::WriteOnly) { QT_STATBUF statBuf; if (!fileName.isEmpty() - && QT_STAT(QFile::encodeName(fileName), &statBuf) == 0 + && QT_STAT(fileName, &statBuf) == 0 && (statBuf.st_mode & S_IFMT) == S_IFREG) { mode += '+'; } else { @@ -254,7 +254,7 @@ bool QFSFileEnginePrivate::nativeOpen(QIODevice::OpenMode openMode) fh = 0; } else { - QByteArray fopenMode = openModeToFopenMode(openMode, filePath); + QByteArray fopenMode = openModeToFopenMode(openMode, nativeFilePath.constData()); // Try to open the file in buffered mode. do { |