]> git.donarmstrong.com Git - lilypond.git/blobdiff - flower/file-path.cc
* flower/file-path.cc (find): try to open directly as well, so we
[lilypond.git] / flower / file-path.cc
index eb08b9251a7702e91672deb9efa4e16807d013fc..25b3931dbc6f07a5a123fe8bf6377c500b3e4809 100644 (file)
@@ -54,8 +54,17 @@ File_path::find (String name) const
 {
   if (!name.length () || (name == "-") )
     return name;
-  int n = size ();
-  for (int i = 0; i < n; i++)
+
+  /*
+    TODO:  should check for absolute path
+   */
+  if (FILE *f =fopen (name.to_str0 (), "r"))
+    {
+      fclose (f);
+      return name;
+    }
+       
+  for (int i = 0; i < size (); i++)
     {
       String file_name = elem (i);
       String sep = ::to_string (DIRSEP);