mirror of
https://bitbucket.org/smil3y/katie.git
synced 2025-02-24 02:42:55 +00:00
do not list directory by default upon QStatInfo construction
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
843c9a092c
commit
fbba3d5390
2 changed files with 5 additions and 5 deletions
|
@ -43,12 +43,12 @@ QStringList QFileSystemWatcherEngineUnix::addPaths(const QStringList &paths,
|
|||
{
|
||||
QStringList p = paths;
|
||||
foreach (const QString &path, p) {
|
||||
QStatInfo fi(path);
|
||||
QStatInfo fi(path, true);
|
||||
if (fi.isDir() || path.endsWith(QLatin1Char('/'))) {
|
||||
if (!directories->contains(path))
|
||||
directories->append(path);
|
||||
if (!path.endsWith(QLatin1Char('/')))
|
||||
fi = QStatInfo(path + QLatin1Char('/'));
|
||||
fi = QStatInfo(path + QLatin1Char('/'), true);
|
||||
this->directories.insert(path, fi);
|
||||
} else {
|
||||
if (!files->contains(path))
|
||||
|
@ -107,9 +107,9 @@ void QFileSystemWatcherEngineUnix::timeout()
|
|||
while (dit.hasNext()) {
|
||||
QHash<QString, QStatInfo>::iterator x = dit.next();
|
||||
QString path = x.key();
|
||||
QStatInfo fi(path);
|
||||
QStatInfo fi(path, true);
|
||||
if (!path.endsWith(QLatin1Char('/')))
|
||||
fi = QStatInfo(path + QLatin1Char('/'));
|
||||
fi = QStatInfo(path + QLatin1Char('/'), true);
|
||||
if (!fi.dirEquals(x.value())) {
|
||||
if (!fi.exists()) {
|
||||
dit.remove();
|
||||
|
|
|
@ -63,7 +63,7 @@ QT_BEGIN_NAMESPACE
|
|||
|
||||
class Q_CORE_EXPORT QStatInfo {
|
||||
public:
|
||||
QStatInfo(const QString &path, const bool listdir = true);
|
||||
QStatInfo(const QString &path, const bool listdir = false);
|
||||
QStatInfo(const QStatInfo &other);
|
||||
|
||||
QStatInfo& operator=(const QStatInfo &other);
|
||||
|
|
Loading…
Add table
Reference in a new issue