mirror of
git://projects.qi-hardware.com/gmenu2x.git
synced 2024-11-22 17:51:34 +02:00
Make FileLister::browse not log a non-existing directory as an error
To avoid unnecessary existence checks, we consider browsing a non-existing directory to be a normal situation.
This commit is contained in:
parent
f85ef14b3e
commit
35724170f8
@ -85,7 +85,9 @@ void FileLister::browse(const string& path, bool clean)
|
|||||||
|
|
||||||
DIR *dirp;
|
DIR *dirp;
|
||||||
if ((dirp = opendir(slashedPath.c_str())) == NULL) {
|
if ((dirp = opendir(slashedPath.c_str())) == NULL) {
|
||||||
|
if (errno != ENOENT) {
|
||||||
ERROR("Unable to open directory: %s\n", slashedPath.c_str());
|
ERROR("Unable to open directory: %s\n", slashedPath.c_str());
|
||||||
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user