mirror of
git://github.com/kovidgoyal/calibre.git
synced 2025-12-20 19:56:17 +01:00
py3: misc fixes
This commit is contained in:
parent
98a435968a
commit
a43207d38a
1 changed files with 2 additions and 1 deletions
|
|
@ -591,7 +591,8 @@ def copyfile(src, dest):
|
|||
def get_hardlink_function(src, dest):
|
||||
if iswindows:
|
||||
import win32file, win32api
|
||||
root = dest[0] + b':'
|
||||
colon = b':' if isinstance(dest, bytes) else ':'
|
||||
root = dest[0] + colon
|
||||
try:
|
||||
is_suitable = win32file.GetDriveType(root) not in (win32file.DRIVE_REMOTE, win32file.DRIVE_CDROM)
|
||||
# See https://msdn.microsoft.com/en-us/library/windows/desktop/aa364993(v=vs.85).aspx
|
||||
|
|
|
|||
Loading…
Reference in a new issue