f1a960eb91
- lvm2.spec: merge rules for device-mapper and lvm2-clvm packages, so there is only one spec file and all packages are built consistently. OBS-URL: https://build.opensuse.org/request/show/138672 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/lvm2?expand=0&rev=47
20 lines
658 B
Diff
20 lines
658 B
Diff
---
|
|
lib/device/dev-cache.c | 6 +++++-
|
|
1 file changed, 5 insertions(+), 1 deletion(-)
|
|
|
|
--- LVM2.2.02.98.orig/lib/device/dev-cache.c
|
|
+++ LVM2.2.02.98/lib/device/dev-cache.c
|
|
@@ -434,7 +434,11 @@ static int _insert_dir(const char *dir)
|
|
dirent_count = scandir(dir, &dirent, NULL, alphasort);
|
|
if (dirent_count > 0) {
|
|
for (n = 0; n < dirent_count; n++) {
|
|
- if (dirent[n]->d_name[0] == '.') {
|
|
+ if (dirent[n]->d_name[0] == '.' && dirent[n]->d_name[1] == '\0') {
|
|
+ free(dirent[n]);
|
|
+ continue;
|
|
+ }
|
|
+ if (dirent[n]->d_name[0] == '.' && dirent[n]->d_name[1] == '.' && dirent[n]->d_name[2] == '\0') {
|
|
free(dirent[n]);
|
|
continue;
|
|
}
|