Author ldconejo
Recipients ldconejo
Date 2018-03-19.18:28:31
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
Windows has a maximum path length limitation of 260 characters. This limitation, however, can be bypassed in the scenario described below. When this occurs, os.isfile() will return false, even when the affected file does exist. For Windows systems, the behavior should be for os.isfile() to return an exception in this case, indicating that maximum path length has been exceeded.

Sample scenario:

1. Let's say you have a folder, named F1 and located in your local machine at this path:


2. Inside of that folder, you have a log file with this name:


3. The combined length of the path and the file is exactly 260 characters, so Windows lets you get away with it when the file is initially created and/or placed there.

4. Later, you decide to make the F1 folder available on your network, under this name:


5. Your log file continues to be in the folder, but its full network path is now 263 characters, effectively violating the maximum path length limitation.

6. If you use os.listdir() on the networked folder, the log file will come up.

7. Now, if you try os.path.isfile(os.path.join(networked_path,logfile_name)) it will return false, even though the file is indeed there and is indeed a file.
Date User Action Args
2018-03-19 18:28:31ldconejosetrecipients: + ldconejo
2018-03-19 18:28:31ldconejosetmessageid: <>
2018-03-19 18:28:31ldconejolinkissue33105 messages
2018-03-19 18:28:31ldconejocreate