]> git.lyx.org Git - lyx.git/commitdiff
Fix bug 4094: HTML export issue with FAT32 on Linux.
authorRichard Heck <rgheck@comcast.net>
Sat, 4 Aug 2007 03:04:23 +0000 (03:04 +0000)
committerRichard Heck <rgheck@comcast.net>
Sat, 4 Aug 2007 03:04:23 +0000 (03:04 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19298 a592a061-630c-0410-9148-cb99ea01b6c8

lib/scripts/ext_copy.py

index 1df65640c65cfcfc24ef06745e09777662c9d594..3bf601b49e9d5abb36d7f77cce8082cf2d5fd2da 100644 (file)
@@ -71,6 +71,8 @@ def main(argv):
 
     # copy all matching files in from_dir to to_dir
     for file in os.listdir(from_dir):
+      if os.path.isdir(file):
+        continue
       junk, ext = os.path.splitext(os.path.basename(file))
       ext = ext.lower()[1:] #strip the leading dot
       try:
@@ -81,7 +83,11 @@ def main(argv):
         continue #not found
       from_file = os.path.join(from_dir, file)
       to_file  = os.path.join(to_dir, file)
-      shutil.copy(from_file, to_file)
+      shutil.copyfile(from_file, to_file)
+      try:
+        shutil.copymode(from_file, to_file)
+      except:
+        pass
     return 0
 
 if __name__ == "__main__":