mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-13 17:20:55 +00:00
Fix bug 4094, as in trunk.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_5_X@19299 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
6a4b38c97d
commit
c4d2c1f514
@ -71,6 +71,8 @@ def main(argv):
|
|||||||
|
|
||||||
# copy all matching files in from_dir to to_dir
|
# copy all matching files in from_dir to to_dir
|
||||||
for file in os.listdir(from_dir):
|
for file in os.listdir(from_dir):
|
||||||
|
if os.path.isdir(file):
|
||||||
|
continue
|
||||||
junk, ext = os.path.splitext(os.path.basename(file))
|
junk, ext = os.path.splitext(os.path.basename(file))
|
||||||
ext = ext.lower()[1:] #strip the leading dot
|
ext = ext.lower()[1:] #strip the leading dot
|
||||||
try:
|
try:
|
||||||
@ -81,7 +83,11 @@ def main(argv):
|
|||||||
continue #not found
|
continue #not found
|
||||||
from_file = os.path.join(from_dir, file)
|
from_file = os.path.join(from_dir, file)
|
||||||
to_file = os.path.join(to_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
|
return 0
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
Loading…
Reference in New Issue
Block a user