[issue30480] samefile and sameopenfile fail for WebDAV mapped drives

2021-02-19 Thread Steve Dower


Steve Dower  added the comment:

Same as issue33935, but since the newer issue has proposed solutions on it 
already, I'm preferring to keep that one open.

--
resolution:  -> duplicate
stage: test needed -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30480] samefile and sameopenfile fail for WebDAV mapped drives

2020-12-19 Thread Steven Geerts


Steven Geerts  added the comment:

still an issue with Python 3.8 and 3.9.
A copy between 2 files on webdave mapped drives can't be done, although src and 
dst are different.

--
nosy: +steven.geerts
versions: +Python 3.8, Python 3.9

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30480] samefile and sameopenfile fail for WebDAV mapped drives

2018-07-18 Thread Giampaolo Rodola'


Change by Giampaolo Rodola' :


--
nosy: +giampaolo.rodola

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30480] samefile and sameopenfile fail for WebDAV mapped drives

2017-06-11 Thread Armin Rigo

Armin Rigo added the comment:

Another example of this misbehaviour: there are cases where ``os.stat()`` will 
internally fail to obtain the whole stat info (in some case related to 
permissions) and silently fall back to the same behaviour as Python 2.7.  In 
particular, it will return a result with ``st_dev == st_ino == 0``.  Of course, 
``os.path.samefile()`` will then consider all such files as "the same one", 
which is nonsense.

--
nosy: +arigo

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30480] samefile and sameopenfile fail for WebDAV mapped drives

2017-05-26 Thread Eryk Sun

New submission from Eryk Sun:

os.path.samefile (used by shutil copyfile and move), os.path.sameopenfile, and 
pathlib.samefile rely on os.path.samestat (from genericpath.py), which compares 
corresponding st_dev and st_ino values. POSIX assures that the tuple (st_dev, 
st_ino) is unique. Windows makes no such assurance for the combination of the 
volume serial number (st_dev) and file index number (st_ino). The volume serial 
number isn't required to be unique or even non-zero ([MS-FSCC] 2.5.9), and the 
file index number may also be zero if the file system doesn't support it 
([MS-FSCC] 2.4.20).

[MS-FSCC]: File System Control Codes
https://msdn.microsoft.com/en-us/library/cc231987

A WebDAV network drive exemplifies both cases. The volume serial number is 
zero, as is the file index number for every file and directory. Thus samestat() 
is true for every comparison on the drive, whether for a file or directory, and 
also when comparing files mounted on different WebDAV drives.

This isn't a common problem, but I think it's severe enough to warrant a 
separate Windows implementation of samefile and sameopenfile. If the 
corresponding st_dev and st_ino values are equal and either is zero, it should 
compare the final paths via _getfinalpathname. The latter would need to be 
modified to support passing a file descriptor for use with sameopenfile.

--
components: Windows
messages: 294538
nosy: eryksun, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
stage: test needed
status: open
title: samefile and sameopenfile fail for WebDAV mapped drives
type: behavior
versions: Python 3.5, Python 3.6, Python 3.7

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com