summaryrefslogtreecommitdiffstats
path: root/src/corelib/io/qfilesystementry.cpp
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2017-06-29 11:16:04 -0700
committerThiago Macieira <thiago.macieira@intel.com>2017-08-17 04:45:29 +0000
commit0dee566e98f5ff4f224e596de1c04de4f9685df4 (patch)
treeb6373e01f79eb135b3c01593c453cc002cfd0e10 /src/corelib/io/qfilesystementry.cpp
parent9a50333dd03969abb3f09c0f90dcb4afd048e47a (diff)
QFileSystemEngine: verify that the file name isn't empty
Making system calls with empty file names is not a good idea. When you run qmake $srcdir, you see this in strace: stat("", 0x7ffed229e250) = -1 ENOENT (No such file or directory) (twice) I've also inlined the isEmpty() function for better code generation. Some functions take QSystemError and some don't. That needs to be corrected at some point, possibly with something like std::expected. Change-Id: I1eba2b016de74620bfc8fffd14ccbfa162f93631 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/corelib/io/qfilesystementry.cpp')
-rw-r--r--src/corelib/io/qfilesystementry.cpp5
1 files changed, 0 insertions, 5 deletions
diff --git a/src/corelib/io/qfilesystementry.cpp b/src/corelib/io/qfilesystementry.cpp
index cbff17d0f1..3ff90bd0a3 100644
--- a/src/corelib/io/qfilesystementry.cpp
+++ b/src/corelib/io/qfilesystementry.cpp
@@ -331,11 +331,6 @@ bool QFileSystemEntry::isRoot() const
return isRootPath(m_filePath);
}
-bool QFileSystemEntry::isEmpty() const
-{
- return m_filePath.isEmpty() && m_nativeFilePath.isEmpty();
-}
-
// private methods
void QFileSystemEntry::findLastSeparator() const