]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-118802: Fix ACL use in test for non-English Windows (GH-118831)
authorSteve Dower <steve.dower@python.org>
Thu, 9 May 2024 12:59:18 +0000 (13:59 +0100)
committerGitHub <noreply@github.com>
Thu, 9 May 2024 12:59:18 +0000 (13:59 +0100)
Lib/test/test_os.py

index 9c9c8536dc75424deeb3a631184a295a8ba71133..9088318600f4c0dd6ad2312472743807decd322b 100644 (file)
@@ -3226,9 +3226,8 @@ class Win32NtTests(unittest.TestCase):
             self.skipTest("Unable to create inaccessible file")
 
         def cleanup():
-            # Give delete permission. We are the file owner, so we can do this
-            # even though we removed all permissions earlier.
-            subprocess.check_output([ICACLS, filename, "/grant", "Everyone:(D)"],
+            # Give delete permission to the owner (us)
+            subprocess.check_output([ICACLS, filename, "/grant", "*WD:(D)"],
                                     stderr=subprocess.STDOUT)
             os.unlink(filename)