summaryrefslogtreecommitdiff
path: root/pygnulib/GLImport.py
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2022-08-03 11:27:21 +0200
committerBruno Haible <bruno@clisp.org>2022-08-03 11:27:21 +0200
commitdbc9a4b304185e2cb0d9f425866f71161c9a1255 (patch)
tree3ea1526794114be5ee54c00ed8305f18fc969e6f /pygnulib/GLImport.py
parentf88aeeb42a4926bc2f7bcb7758ca511e75404593 (diff)
downloadgnulib-dbc9a4b304185e2cb0d9f425866f71161c9a1255.tar.gz
gnulib-tool.py: Avoid errors when writing to a VFAT file system.
* pygnulib/constants.py (copyfile, copyfile2): New functions. * gnulib-tool.py: Use them instead of shutil. * pygnulib/*.py: Likewise.
Diffstat (limited to 'pygnulib/GLImport.py')
-rw-r--r--pygnulib/GLImport.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/pygnulib/GLImport.py b/pygnulib/GLImport.py
index 5009917e76..cbee0c4f33 100644
--- a/pygnulib/GLImport.py
+++ b/pygnulib/GLImport.py
@@ -52,6 +52,7 @@ TESTS = constants.TESTS
compiler = constants.compiler
joinpath = constants.joinpath
cleaner = constants.cleaner
+copyfile2 = constants.copyfile2
isabs = os.path.isabs
isdir = os.path.isdir
isfile = os.path.isfile
@@ -734,7 +735,7 @@ AC_DEFUN([%s_FILE_LIST], [\n''' % macro_prefix
if not self.config['dryrun']:
print('Updating %s (backup in %s)' %
(srcpath, backupname))
- shutil.copy2(srcpath, backupname)
+ copyfile2(srcpath, backupname)
result = ''
with codecs.open(srcpath, 'ab', 'UTF-8') as file:
file.write(destdata)