File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2907,10 +2907,16 @@ features:
29072907
29082908 .. attribute :: path
29092909
2910- The entry's full path name: equivalent to ``os.path.join(scandir_path,
2911- entry.name) `` where *scandir_path * is the :func: `scandir ` *path *
2912- argument. The path is only absolute if the :func: `scandir ` *path *
2913- argument was absolute. If the :func: `scandir ` *path *
2910+ The entry's path name: equivalent to ``os.path.join(scandir_path,
2911+ entry.name) `` where *scandir_path * is the original :func: `scandir `
2912+ *path * argument. Apart from the filename, the path preserves the
2913+ original :func: `scandir ` argument. If the :func: `scandir ` *path *
2914+ argument was relative, the :attr: `path ` attribute is also relative.
2915+ Changing the current working directory after creating the
2916+ :func: `scandir ` iterator may cause later uses of :attr: `path ` to resolve
2917+ differently. On some platforms, the constructed path may not be valid
2918+ if the original :func: `scandir ` argument was usable for enumeration but
2919+ not for joining with the entry name. If the :func: `scandir ` *path *
29142920 argument was a :ref: `file descriptor <path_fd >`, the :attr: `path `
29152921 attribute is the same as the :attr: `name ` attribute.
29162922
You can’t perform that action at this time.
0 commit comments