mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-06-23 15:30:45 -04:00
py3: misc fixes
This commit is contained in:
parent
98a435968a
commit
a43207d38a
@ -591,7 +591,8 @@ def copyfile(src, dest):
|
|||||||
def get_hardlink_function(src, dest):
|
def get_hardlink_function(src, dest):
|
||||||
if iswindows:
|
if iswindows:
|
||||||
import win32file, win32api
|
import win32file, win32api
|
||||||
root = dest[0] + b':'
|
colon = b':' if isinstance(dest, bytes) else ':'
|
||||||
|
root = dest[0] + colon
|
||||||
try:
|
try:
|
||||||
is_suitable = win32file.GetDriveType(root) not in (win32file.DRIVE_REMOTE, win32file.DRIVE_CDROM)
|
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
|
# See https://msdn.microsoft.com/en-us/library/windows/desktop/aa364993(v=vs.85).aspx
|
||||||
|
Loading…
x
Reference in New Issue
Block a user