Allow configs to start with a dot

This fixes the disappearance of domains and networks starting with a
dot.

https://bugzilla.redhat.com/show_bug.cgi?id=1333248
This commit is contained in:
Ján Tomko 2016-06-21 17:40:37 +02:00
parent dad2f010b0
commit 5217fe3db4
5 changed files with 0 additions and 21 deletions

View File

@ -3248,9 +3248,6 @@ virNetworkLoadAllState(virNetworkObjListPtr nets,
while ((ret = virDirRead(dir, &entry, stateDir)) > 0) {
virNetworkObjPtr net;
if (entry->d_name[0] == '.')
continue;
if (!virFileStripSuffix(entry->d_name, ".xml"))
continue;
@ -3283,9 +3280,6 @@ int virNetworkLoadAllConfigs(virNetworkObjListPtr nets,
while ((ret = virDirRead(dir, &entry, configDir)) > 0) {
virNetworkObjPtr net;
if (entry->d_name[0] == '.')
continue;
if (!virFileStripSuffix(entry->d_name, ".xml"))
continue;

View File

@ -3216,9 +3216,6 @@ virNWFilterLoadAllConfigs(virNWFilterObjListPtr nwfilters,
while ((ret = virDirRead(dir, &entry, configDir)) > 0) {
virNWFilterObjPtr nwfilter;
if (entry->d_name[0] == '.')
continue;
if (!virFileStripSuffix(entry->d_name, ".xml"))
continue;

View File

@ -1953,9 +1953,6 @@ virStoragePoolLoadAllState(virStoragePoolObjListPtr pools,
while ((ret = virDirRead(dir, &entry, stateDir)) > 0) {
virStoragePoolObjPtr pool;
if (entry->d_name[0] == '.')
continue;
if (!virFileStripSuffix(entry->d_name, ".xml"))
continue;
@ -1991,9 +1988,6 @@ virStoragePoolLoadAllConfigs(virStoragePoolObjListPtr pools,
char *autostartLink;
virStoragePoolObjPtr pool;
if (entry->d_name[0] == '.')
continue;
if (!virFileHasSuffix(entry->d_name, ".xml"))
continue;

View File

@ -583,9 +583,6 @@ virDomainObjListLoadAllConfigs(virDomainObjListPtr doms,
while ((ret = virDirRead(dir, &entry, configDir)) > 0) {
virDomainObjPtr dom;
if (entry->d_name[0] == '.')
continue;
if (!virFileStripSuffix(entry->d_name, ".xml"))
continue;

View File

@ -510,9 +510,6 @@ qemuDomainSnapshotLoad(virDomainObjPtr vm,
}
while ((direrr = virDirRead(dir, &entry, NULL)) > 0) {
if (entry->d_name[0] == '.')
continue;
/* NB: ignoring errors, so one malformed config doesn't
kill the whole process */
VIR_INFO("Loading snapshot file '%s'", entry->d_name);