mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 21:55:25 +00:00
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:
parent
dad2f010b0
commit
5217fe3db4
@ -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;
|
||||
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user