mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-20 09:34:42 +04:00
Adjust feature detection for 2.7.15
This commit is contained in:
parent
f88e007f52
commit
7f29fd5591
1 changed files with 5 additions and 1 deletions
|
|
@ -52,7 +52,11 @@ def broken_deep_listdir(): # pragma: no cover (platform specific)
|
||||||
os.listdir(str('\\\\?\\') + os.path.abspath(str('.')))
|
os.listdir(str('\\\\?\\') + os.path.abspath(str('.')))
|
||||||
except OSError:
|
except OSError:
|
||||||
return True
|
return True
|
||||||
else:
|
try:
|
||||||
|
os.listdir(b'\\\\?\C:' + b'\\' * 300)
|
||||||
|
except TypeError:
|
||||||
|
return True
|
||||||
|
except OSError:
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue