Mercurial > hg > vamp-plugin-sdk
comparison vamp-sdk/hostext/PluginLoader.cpp @ 97:ca44b3594d2e
* Apply (slightly tweaked) DT_UNKNOWN patch from Alexis Ballier <aballier@gentoo.org>
author | cannam |
---|---|
date | Sun, 18 Nov 2007 10:53:54 +0000 |
parents | c94c066a4897 |
children | 896a97349ac5 |
comparison
equal
deleted
inserted
replaced
96:074873a47447 | 97:ca44b3594d2e |
---|---|
552 DIR *d = opendir(dir.c_str()); | 552 DIR *d = opendir(dir.c_str()); |
553 if (!d) return files; | 553 if (!d) return files; |
554 | 554 |
555 struct dirent *e = 0; | 555 struct dirent *e = 0; |
556 while ((e = readdir(d))) { | 556 while ((e = readdir(d))) { |
557 | |
558 if (!(e->d_type & DT_REG) && (e->d_type != DT_UNKNOWN)) continue; | |
557 | 559 |
558 if (!(e->d_type & DT_REG) || !e->d_name) continue; | 560 if (!e->d_name) continue; |
559 | 561 |
560 size_t len = strlen(e->d_name); | 562 size_t len = strlen(e->d_name); |
561 if (len < extlen + 2 || | 563 if (len < extlen + 2 || |
562 e->d_name + len - extlen - 1 != "." + extension) { | 564 e->d_name + len - extlen - 1 != "." + extension) { |
563 continue; | 565 continue; |
564 } | 566 } |