]> git.donarmstrong.com Git - lilypond.git/commitdiff
(is_dir): canonicalize file name before stat'ing.
authorhanwen <hanwen>
Tue, 2 May 2006 11:32:54 +0000 (11:32 +0000)
committerhanwen <hanwen>
Tue, 2 May 2006 11:32:54 +0000 (11:32 +0000)
ChangeLog
flower/file-path.cc

index 7db4d13f9130a7cebc7da968e35939b4e57f70f9..3aec3a8be6c47e9a0c4df01817c63cf6a3b26d69 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,7 @@
 2006-05-02  Han-Wen Nienhuys  <hanwen@lilypond.org>
 
+       * flower/file-path.cc (is_dir): canonicalize file name before stat'ing.
+
        * lily/relocate.cc (framework_relocation): remove old relocation stuff.
 
 2006-05-01  Mats Bengtsson  <mabe@drongo.s3.kth.se>
index 3fc85000729af83694f6b4397d5b0111bb71586e..63ecdb833ab46a451f98f493e25b8e6bfe080b56 100644 (file)
@@ -66,6 +66,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)