mirror of
https://github.com/facebook/sapling.git
synced 2024-10-06 23:07:18 +03:00
icasefs: consider as case sensitive if there is no counterevidence, for safety
for safety, this patch prevents case-less name from misleading into case insensitivity, even though such names should not be used.
This commit is contained in:
parent
44af3b0ebf
commit
f9ca02bd18
@ -595,9 +595,12 @@ def checkcase(path):
|
||||
"""
|
||||
s1 = os.stat(path)
|
||||
d, b = os.path.split(path)
|
||||
p2 = os.path.join(d, b.upper())
|
||||
if path == p2:
|
||||
p2 = os.path.join(d, b.lower())
|
||||
b2 = b.upper()
|
||||
if b == b2:
|
||||
b2 = b.lower()
|
||||
if b == b2:
|
||||
return True # no evidence against case sensitivity
|
||||
p2 = os.path.join(d, b2)
|
||||
try:
|
||||
s2 = os.stat(p2)
|
||||
if s2 == s1:
|
||||
|
Loading…
Reference in New Issue
Block a user