Here is a thread showing several issues with the use of Path.absolute(). The method is not documented, and its behavior is not guaranted.
Sadly, as of now, there is no equivalent of the os.path.abspath() function for Path objects.
We should ensure to get rid of all calls to Path.absolute() and use that code instead:
def absolutepath(path: Union[Path, str]) -> Path: """Convert a path to an absolute path using os.path.abspath. Prefer this over Path.resolve() (see #6523). Prefer this over Path.absolute() (not public, doesn't normalize). """ return Path(os.path.abspath(str(path)))
- causes
-
NXDRIVE-2448 drive sync doens't download files
- Resolved
- is related to
-
NXDRIVE-2485 Use os.path.realpath() instead of abspath()
- Resolved
-
NXDRIVE-1109 Use the pathlib module to handle paths
- Resolved
- Is referenced in