summaryrefslogtreecommitdiffstats
path: root/src/corelib/io/qfilesystemengine.cpp
diff options
context:
space:
mode:
authorShane Kearns <shane.kearns@accenture.com>2010-09-09 16:05:33 (GMT)
committerShane Kearns <shane.kearns@accenture.com>2010-09-09 16:12:35 (GMT)
commit30dcb614f31d64f052312b65bdd7720974b809d4 (patch)
tree72b96596ed57e562d7cee20b08e1aa9dd91b7287 /src/corelib/io/qfilesystemengine.cpp
parente2f34f6b77c8ddb39a6983648818a25236ddeebb (diff)
downloadQt-30dcb614f31d64f052312b65bdd7720974b809d4.zip
Qt-30dcb614f31d64f052312b65bdd7720974b809d4.tar.gz
Qt-30dcb614f31d64f052312b65bdd7720974b809d4.tar.bz2
Set file metadata variables to known values when stat fails
For unix port, set file times and size to 0, and owner/group id to -2 (nobody) for files that don't exist. Also implemented saving owner and group ids in fillFromStatBuf, which was missing. Reviewed-by: joao
Diffstat (limited to 'src/corelib/io/qfilesystemengine.cpp')
-rw-r--r--src/corelib/io/qfilesystemengine.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/corelib/io/qfilesystemengine.cpp b/src/corelib/io/qfilesystemengine.cpp
index 0563a15..56072d4 100644
--- a/src/corelib/io/qfilesystemengine.cpp
+++ b/src/corelib/io/qfilesystemengine.cpp
@@ -280,6 +280,8 @@ void QFileSystemMetaData::fillFromStatBuf(const QT_STATBUF &statBuffer)
creationTime_ = statBuffer.st_ctime ? statBuffer.st_ctime : statBuffer.st_mtime;
modificationTime_ = statBuffer.st_mtime;
accessTime_ = statBuffer.st_atime;
+ userId_ = statBuffer.st_uid;
+ groupId_ = statBuffer.st_gid;
#endif
}