aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPier Luigi Fiorini <pierluigi.fiorini@liri.io>2017-05-24 08:01:46 +0200
committerPier Luigi Fiorini <pierluigi.fiorini@liri.io>2018-10-09 09:45:20 +0000
commita6e26af48e545b1e273e983780b60a49f6d7097f (patch)
treef0a906ca6e38879f6dd309cac333d1a40dcaaffe /src
parent1ce4105a7d3207410c9be8d202464e6f2b2c6861 (diff)
File existence check on Flatpak and OSTree
OSTree uses mtime 0 for all checkouts in order to maximize sharing of objects. (i.e. two identical source files with different mtimes should result in the same hardlinked file in the ostree checkout) However Qbs thinks the file doesn't exist with mtime 0 so we need to rely on a different way for OSTree. OSTree nowadays is not only used by Flatpak, but also some Linux distributions like Fedora Silverblue and QtOTA itself. Change-Id: Ia2efc269dc6eb1862b4015bdcce7f9207f3a5efa Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/lib/corelib/tools/fileinfo.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/corelib/tools/fileinfo.cpp b/src/lib/corelib/tools/fileinfo.cpp
index b37f20382..15a8e8783 100644
--- a/src/lib/corelib/tools/fileinfo.cpp
+++ b/src/lib/corelib/tools/fileinfo.cpp
@@ -363,7 +363,7 @@ FileInfo::FileInfo(const QString &fileName)
bool FileInfo::exists() const
{
- return m_stat.st_mtime != 0;
+ return m_stat.st_mode != 0;
}
FileTime FileInfo::lastModified() const