-
-
Notifications
You must be signed in to change notification settings - Fork 34.2k
Open
Labels
extension-modulesC modules in the Modules dirC modules in the Modules dirtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Description
Bug report
With a network drive mounted with CIFS and using the mfsymlinks options, os.path.islink and os.path.isdir will return True for a symbolic link to a directory, whereas the corresponding DirEntry for the symlink will return False for both DirEntry.is_symlink() and DirEntry.is_dir().
Repro steps:
- Mount a CIFS drive with -o mfsymlinks to /mnt/scratch
- mkdir /mnt/scratch/dir
- ln -s /mnt/scratch/dir /mnt/scratch/link
- In python 3, run os.scandir('/mnt/scratch') and iterate to the link entry
- Validate is_symlink() and is_dir() return False
- Run os.path.islink('/mnt/scratch/link') and os.path.isdir('/mnt/scratch/link') and validate both return True
Your environment
Python version 3.8.10, Ubuntu 20.04
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
extension-modulesC modules in the Modules dirC modules in the Modules dirtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error

