]> git.donarmstrong.com Git - lilypond.git/blobdiff - flower/file-path.cc
Add a hack to packed spacing to work around extra columns.
[lilypond.git] / flower / file-path.cc
index 3fc85000729af83694f6b4397d5b0111bb71586e..175357d88962d232328d70f796732ee22ce0b7de 100644 (file)
@@ -3,14 +3,12 @@
 
   source file of the Flower Library
 
-  (c) 1997--2006 Han-Wen Nienhuys <hanwen@xs4all.nl>
+  (c) 1997--2007 Han-Wen Nienhuys <hanwen@xs4all.nl>
   Jan Nieuwenhuizen <janneke@gnu.org>
 */
 
 #include "file-path.hh"
 
-#include "std-string.hh"
-
 #include <cstdio>
 #include <cerrno>
 
@@ -66,6 +64,11 @@ is_file (string file_name)
 bool
 is_dir (string file_name)
 {
+  /*
+    canonicalize; in particular, trailing slashes should disappear.
+   */
+  file_name = File_name (file_name).to_string ();
+  
 #if !STAT_MACROS_BROKEN
   struct stat sbuf;
   if (stat (file_name.c_str (), &sbuf) != 0)