Skip to content

Commit

Permalink
Added Test for bitmask
Browse files Browse the repository at this point in the history
  • Loading branch information
JaniruTEC committed Jun 9, 2020
1 parent 8b636ca commit b0433ac
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,12 @@ public DirListingFileSystem(Path root, FileSystemInformation fileSystemInformati
public int zwCreateFile(WString rawPath, DokanIOSecurityContext securityContext, int rawDesiredAccess, int rawFileAttributes, int rawShareAccess, int rawCreateDisposition, int rawCreateOptions, DokanFileInfo dokanFileInfo) {
Path p = getrootedPath(rawPath);

if(!this.dokanOptions.equals(dokanFileInfo.DokanOpts)) {
if (!this.dokanOptions.equals(dokanFileInfo.DokanOpts)) {
System.out.println("This: " + this.dokanOptions);
System.out.println("Parameter: " + dokanFileInfo.DokanOpts);

System.out.println("This Timeout: " + paddedLong(this.dokanOptions.Timeout));
System.out.println("Parameter Timeout: " + paddedLong(dokanFileInfo.DokanOpts.Timeout));
}

//the files must exist and we are read only here
Expand Down Expand Up @@ -108,6 +111,10 @@ public int zwCreateFile(WString rawPath, DokanIOSecurityContext securityContext,
return NtStatuses.STATUS_SUCCESS;
}

private String paddedLong(long l) {
return String.format("%64s", Long.toBinaryString(l)).replace(' ', '0');
}

@Override
public void cleanup(WString rawPath, DokanFileInfo dokanFileInfo) {
Path p = getrootedPath(rawPath);
Expand Down

0 comments on commit b0433ac

Please sign in to comment.