Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dokany 0.8.0 #241

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion fs/expose/dokan/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,8 @@
DOKAN_DRIVER_INSTALL_ERROR = -3
DOKAN_START_ERROR = -4
DOKAN_MOUNT_ERROR = -5
DOKAN_MOUNT_POINT_ERROR = -6
DOKAN_VERSION_ERROR = -7

# Misc windows constants
FILE_LIST_DIRECTORY = 0x01
Expand Down Expand Up @@ -917,7 +919,7 @@ def check_ready(mp=None):
numthreads = kwds.pop("numthreads",0)
flags = kwds.pop("flags",0)
FSOperationsClass = kwds.pop("FSOperationsClass",FSOperations)
opts = libdokan.DOKAN_OPTIONS(drive[:1], numthreads, flags)
opts = libdokan.DOKAN_OPTIONS(libdokan.DOKAN_MINIMUM_COMPATIBLE_VERSION, drive[:1], numthreads, flags, 0, 0)
ops = FSOperationsClass(fs, **kwds)
if ready_callback:
check_thread = threading.Thread(target=check_ready)
Expand Down
14 changes: 8 additions & 6 deletions fs/expose/dokan/libdokan.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@

DokanVersion.restype = ULONG
DokanVersion.argtypes = ()
if DokanVersion() < 392: # ths is release 0.5.3
DOKAN_MINIMUM_COMPATIBLE_VERSION = 800 # this is release 0.8.0
if DokanVersion() < DOKAN_MINIMUM_COMPATIBLE_VERSION:
raise ImportError("Dokan DLL is too old")


Expand Down Expand Up @@ -74,13 +75,14 @@ class BY_HANDLE_FILE_INFORMATION(Structure):

class DOKAN_OPTIONS(Structure):
_fields_ = [
("DriveLetter", WCHAR),
("ThreadCount", USHORT),
("Options", ULONG),
("GlobalContext", ULONG64),
("Version", USHORT),
("MountPoint", LPCWSTR),
("ThreadCount", USHORT),
("Options", ULONG),
("GlobalContext", ULONG64),
("Timeout", ULONG)
]


class DOKAN_FILE_INFO(Structure):
_fields_ = [
("Context", ULONG64),
Expand Down