]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-98940: Fix Mac/Extras.install.py File filter bug (GH-98943)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Wed, 16 Nov 2022 09:45:31 +0000 (01:45 -0800)
committerGitHub <noreply@github.com>
Wed, 16 Nov 2022 09:45:31 +0000 (01:45 -0800)
Slightly simplify the script and fix a case issue in the name of ``.DS_Store`` files.

(cherry picked from commit ea88d34de27ba2b3acaeb03c7dc7829dff40ea5c)

Co-authored-by: zhangbo <zhangbo2012@outlook.com>
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
Mac/Extras.install.py
Misc/NEWS.d/next/macOS/2022-11-01-10-32-23.gh-issue-98940.W3YzC_.rst [new file with mode: 0644]

index ab1af71dfd823ffa8ef330e97e388a5277ba0aee..41bfa53d61630794778f33bfe4532e70bc83700c 100644 (file)
@@ -9,10 +9,9 @@ verbose = 1
 debug = 0
 
 def isclean(name):
-    if name == 'CVS': return 0
-    if name == '.cvsignore': return 0
-    if name == '.DS_store': return 0
-    if name == '.svn': return 0
+    if name in ('CVS', '.cvsignore', '.svn'):
+        return 0
+    if name.lower() == '.ds_store': return 0
     if name.endswith('~'): return 0
     if name.endswith('.BAK'): return 0
     if name.endswith('.pyc'): return 0
diff --git a/Misc/NEWS.d/next/macOS/2022-11-01-10-32-23.gh-issue-98940.W3YzC_.rst b/Misc/NEWS.d/next/macOS/2022-11-01-10-32-23.gh-issue-98940.W3YzC_.rst
new file mode 100644 (file)
index 0000000..18ef0b0
--- /dev/null
@@ -0,0 +1 @@
+Fix ``Mac/Extras.install.py`` file filter bug.