[issue45013] os.path.isfile fails on path exactly 260 Chars long in Windows

2021-09-16 Thread Steve Dower


Change by Steve Dower :


--
resolution:  -> third party
stage:  -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45013] os.path.isfile fails on path exactly 260 Chars long in Windows

2021-08-27 Thread Luke Rossi


Luke Rossi  added the comment:

What an annoying edge case - makes sense that there isn't an easy fix.

The extended path prefix worked perfectly - thanks

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45013] os.path.isfile fails on path exactly 260 Chars long in Windows

2021-08-26 Thread Eryk Sun


Eryk Sun  added the comment:

The legacy maximum buffer size is 260 characters, but remember that strings in 
C are terminated by a null character (i.e. "\0"). So the maximum path length is 
actually 259 characters when opening files. 

In Windows 10 with Python 3.6+, you can enable the `LongPathsEnabled` system 
setting to extend the limit up to about 32760 characters. In many cases you can 
also use the "?\\" extended-path prefix to access a long path (e.g. 
r"\\?\C:\some\long\path"), but the path has to be fully qualified and can only 
use backslash as the separator, not forward slash.

--
components: +Windows
nosy: +eryksun, paul.moore, steve.dower, tim.golden, zach.ware

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45013] os.path.isfile fails on path exactly 260 Chars long in Windows

2021-08-26 Thread Luke Rossi


Luke Rossi  added the comment:

I saw 33105, but believe this to be a different issue as path length 260 is 
valid.

I did testing by crafting a path that is exactly 260 by hand - A path 259 in 
length reports .isfile() as True.

The Stack Error:
[WinError 3] The system cannot find the path specified

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue45013] os.path.isfile fails on path exactly 260 Chars long in Windows

2021-08-26 Thread Luke Rossi


New submission from Luke Rossi :

I saw 33105, but believe this to be a different issue as path length 260 is 
valid.

I did testing by crafting a path that is exactly 260 by hand - A path 259 in 
length reports .isfile() as True.

--
components: Library (Lib)
messages: 400341
nosy: serhiy.storchaka, ubermidget2
priority: normal
severity: normal
status: open
title: os.path.isfile fails on path exactly 260 Chars long in Windows
type: behavior
versions: Python 3.9

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com