Skip to content
This repository has been archived by the owner on Mar 14, 2024. It is now read-only.

Commit

Permalink
Align enforced supported version with DeviceOptions.Version field
Browse files Browse the repository at this point in the history
  • Loading branch information
infeo committed Nov 17, 2022
1 parent 522776e commit 6a575f6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,13 @@
* Dokany mount options used to describe Dokany device behavior. This is the same structure as PDOKAN_OPTIONS (dokan.h) in the C++ version of Dokany.
*/
public class DeviceOptions extends Structure implements Structure.ByReference {

public static short DOKANY_FEATURE_VERSION = 150;

/**
* Version of the Dokany features requested (version "123" is equal to Dokany version 1.2.3).
*/
public short Version = 150;
public short Version = DOKANY_FEATURE_VERSION;
/**
* Number of threads to be used internally by Dokany library. More thread will handle more event at the same time.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ public class DokanyMountProvider implements MountService {

private static final Logger LOG = LoggerFactory.getLogger(DokanyMountProvider.class);

private static final int SUPPORTED_API_VERSION = 150;
private static final int SUPPORTED_DRIVER_VERSION = 400;

private static final EnumIntegerSet<FileSystemFeature> DEFAULT_FS_FEATURES = new EnumIntegerSet(CASE_PRESERVED_NAMES, CASE_SENSITIVE_SEARCH, UNICODE_ON_DISK);
Expand All @@ -52,7 +51,7 @@ public String displayName() {
@Override
public boolean isSupported() {
return Dokany.isInstalled() //
&& Dokany.apiVersion() >= SUPPORTED_API_VERSION //
&& Dokany.apiVersion() >= DeviceOptions.DOKANY_FEATURE_VERSION //
&& Dokany.driverVersion() >= SUPPORTED_DRIVER_VERSION;
}

Expand Down

0 comments on commit 6a575f6

Please sign in to comment.