summaryrefslogtreecommitdiff
path: root/pygnulib/GLTestDir.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/GLTestDir.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/GLTestDir.py')
-rw-r--r--pygnulib/GLTestDir.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/pygnulib/GLTestDir.py b/pygnulib/GLTestDir.py
index 36aa5d2117..c230fbc744 100644
--- a/pygnulib/GLTestDir.py
+++ b/pygnulib/GLTestDir.py
@@ -53,6 +53,7 @@ UTILS = constants.UTILS
TESTS = constants.TESTS
compiler = constants.compiler
joinpath = constants.joinpath
+copyfile = constants.copyfile
isdir = os.path.isdir
isfile = os.path.isfile
normpath = os.path.normpath
@@ -333,12 +334,12 @@ class GLTestDir(object):
if isfile(destpath):
os.remove(destpath)
if flag:
- shutil.copy(lookedup, destpath)
+ copyfile(lookedup, destpath)
else: # if not flag
if self.filesystem.shouldLink(src, lookedup) == CopyAction.Symlink:
constants.link_relative(lookedup, destpath)
else:
- shutil.copy(lookedup, destpath)
+ copyfile(lookedup, destpath)
# Create $sourcebase/Makefile.am.
for_test = True