File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2980,10 +2980,16 @@ features:
29802980
29812981 .. attribute :: path
29822982
2983- The entry's full path name: equivalent to ``os.path.join(scandir_path,
2984- entry.name) `` where *scandir_path * is the :func: `scandir ` *path *
2985- argument. The path is only absolute if the :func: `scandir ` *path *
2986- argument was absolute. If the :func: `scandir ` *path *
2983+ The entry's path name: equivalent to ``os.path.join(scandir_path,
2984+ entry.name) `` where *scandir_path * is the original :func: `scandir `
2985+ *path * argument. Apart from the filename, the path preserves the
2986+ original :func: `scandir ` argument. If the :func: `scandir ` *path *
2987+ argument was relative, the :attr: `path ` attribute is also relative.
2988+ Changing the current working directory after creating the
2989+ :func: `scandir ` iterator may cause later uses of :attr: `path ` to resolve
2990+ differently. On some platforms, the constructed path may not be valid
2991+ if the original :func: `scandir ` argument was usable for enumeration but
2992+ not for joining with the entry name. If the :func: `scandir ` *path *
29872993 argument was a :ref: `file descriptor <path_fd >`, the :attr: `path `
29882994 attribute is the same as the :attr: `name ` attribute.
29892995
You can’t perform that action at this time.
0 commit comments