Emanuel Rumpf wrote:
> I replaced the function File::GetFiles in src/common/File.cpp.
> It worked instantly then ! :-)

If I clean up your patch, the only significant change left is:

--- linuxsampler/src/common/File.cpp    2009-10-18 10:18:23.000000000 +0200
+++ File.cpp    2009-10-18 10:34:49.000000000 +0200
@@ -90,14 +90,5 @@
          struct dirent* pEnt = readdir(pDir);
          while (pEnt != NULL) {
-#ifdef _DIRENT_HAVE_D_TYPE
-            if (pEnt->d_type == DT_REG) {
-                fileList->push_back(std::string(pEnt->d_name));
-            }
-#else
-            struct stat s;
-            if (stat((Dir + DirSeparator + pEnt->d_name).c_str(), &s) 
== 0 && S_ISREG(s.st_mode)) {
-                fileList->push_back(std::string(pEnt->d_name));
-            }
-#endif
+            fileList->push_back(std::string(pEnt->d_name));
              pEnt = readdir(pDir);
          }

That is, you changed the behavior of GetFiles to return all entries in a 
directory, not just regular files. Seems a bit drastic to me. Is it 
really a good change, Grigor/Benno?

Do your system have _DIRENT_HAVE_D_TYPE or not? What type of entry is 
GetFiles missing to return without your patch?

/Andreas


------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Linuxsampler-devel mailing list
Linuxsampler-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxsampler-devel

Reply via email to