]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-118802: Fix ACL use in test for non-English Windows (GH-118831)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Thu, 9 May 2024 13:41:15 +0000 (15:41 +0200)
committerGitHub <noreply@github.com>
Thu, 9 May 2024 13:41:15 +0000 (13:41 +0000)
(cherry picked from commit 82acc5f2113bffd0ed902851f4ccf5b9be8980b2)

Co-authored-by: Steve Dower <steve.dower@python.org>
Lib/test/test_os.py

index e8f80046649cd48861a31cda34e9f0deb06c330c..7464aaa794941cd69e5ec65d7fa7b97f96b4dcb3 100644 (file)
@@ -3176,9 +3176,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)