- if (!nm.length () || (nm == "-") )
- return nm;
- for (int i=0; i < size (); i++)
- {
- String path = elem (i);
- String sep = ::to_string (DIRSEP);
- String right (path.right_string (1));
- if (path.length () && right != sep)
- path += ::to_string (DIRSEP);
-
- path += nm;
-
-
-#if 0
- /*
- Check if directory. TODO: encapsulate for autoconf
- */
- struct stat sbuf;
- if (stat (path.to_str0 (), &sbuf) != 0)
- continue;
-
- if (! (sbuf.st_mode & __S_IFREG))
- continue;
-#endif
-#if !STAT_MACROS_BROKEN
-
- struct stat sbuf;
- if (stat (path.to_str0 (), &sbuf) != 0)
- continue;