mirror of
https://github.com/nextcloud/desktop.git
synced 2025-10-26 11:17:43 +00:00
FolderWatcher: Check for hidden outside of loop
This commit is contained in:
parent
a78bb252de
commit
6eec896282
@ -71,6 +71,12 @@ bool FolderWatcher::pathIsIgnored( const QString& path )
|
||||
{
|
||||
if( path.isEmpty() ) return true;
|
||||
|
||||
QFileInfo fInfo(path);
|
||||
if( fInfo.isHidden() ) {
|
||||
qDebug() << "* Discarded as is hidden!" << fInfo.filePath();
|
||||
return true;
|
||||
}
|
||||
|
||||
// Remember: here only directories are checked!
|
||||
// If that changes to files too at some day, remember to check
|
||||
// for the database name as well as the trailing slash rule for
|
||||
@ -79,12 +85,6 @@ bool FolderWatcher::pathIsIgnored( const QString& path )
|
||||
QRegExp regexp(pattern);
|
||||
regexp.setPatternSyntax(QRegExp::Wildcard);
|
||||
|
||||
QFileInfo fInfo(path);
|
||||
if( fInfo.isHidden() ) {
|
||||
qDebug() << "* Discarded as is hidden!" << fInfo.filePath();
|
||||
return true;
|
||||
}
|
||||
|
||||
if(pattern.endsWith('/')) {
|
||||
// directory only pattern. But since only dirs here, we cut off the trailing dir.
|
||||
pattern.remove(pattern.length()-1, 1); // remove the last char.
|
||||
|
||||
Loading…
Reference in New Issue
Block a user