Git Product home page Git Product logo

dokan-rust's People

Contributors

ddosolitary avatar inetic avatar koltesdigital avatar liryna avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

dokan-rust's Issues

update widestring

We're on widestring v0.4.3 but the latest is v1.0.2. The most important thing we're missing is a macro u16str!

`find_files_with_pattern` must be implemented

It's my understanding that in C the function pointer to find_files_with_pattern may be left unset. However the rust wrapper implements its default implementation here.

Problem is this: The C code uses find_files here to get the content of the directory. Then it gets here, then here, then here and finally ends up in MatchFiles.

In MatchFiles it checks whether FindFilesWithPattern is set, which it is and thus patternCheck is NOT set to TRUE.

Because of that this condition always passes on the first entry that find_files returns.

This bug can be reproduced with your memfs example:

  1. mount the fs
  2. create some number of files in it: f1.txt, f2.txt, f3.txt, f4.txt
  3. select one of the files, say f3.txt
  4. press the Del button
  5. a dialog appears asking whether you want to delete a file. This file will likely not be f3.txt (if it is, try with another file)

Documentation hosting

@Liryna Is it possible to host documentation pages of this project on dokan-dev.github.io, like what has been done for dokany and dokan-dotnet?

Normally documentation of Rust packages are expected to be hosted on docs.rs. However, their build environment doesn't provide Windows SDK, which is required to build this project. So self-hosting seems to be the only option.

How to customize dokan1.dll dependencies?

I tried to embed Dokany into my application, but after importing "dokan-rust", the program will forcefully request "dokan1.dll", and the main() entry is not executed, so the dll cannot be released in the main() function, is there any How to customize the dependencies of "dokan1.dll"?

Dokan 2.0.0 support

Dokan 2.0.0 was just released. There are a few changes in the API dokan.h and some logic described here that changed.
It would be great if the wrapper could implement those changes!
And of course, feel free to ping me if any questions or issues arise.

Logs from FileSystemHandler are not captured in tests

When a println! line is inserted into a function inside an implementation of the FileSystemHandler and a test is run, the println! line is not captured by the test but is printed out right when the test is run.

For example, if we add println!("<<< hello from handler >>>") above this line, and then run the (currently failing) test cargo test can_find_files. The output is

running 1 test
<<< hello from handler >>>
test usage_tests::can_find_files ... FAILED

failures:

---- usage_tests::can_find_files stdout ----
thread 'usage_tests::can_find_files' panicked at dokan\src\usage_tests.rs:1144:9:
assertion `left == right` failed
  left: 16
 right: 128
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace


failures:
    usage_tests::can_find_files

test result: FAILED. 0 passed; 1 failed; 0 ignored; 0 measured; 32 filtered out; finished in 0.02s

error: test failed, to rerun pass `-p dokan --lib`

Notice that the "<<< hello from handler >>>" line appears above the "---- usage_tests::can_find_files stdout ----" line.

This would normally not be too big of a problem, but it becomes one when tests run ok individually and only start misbehaving when they are run all at once.

My theory is that the FileSystemHandler functions are being called from insider the driver and this somehow circumvents the stdout output that the test is capturing. But I know next to nothing about Windows driver development, so I might very well be wrong.

Perhaps there is a flag that I missed that could fix this? Or maybe someone could suggest a fix?

Need Help, Issue with read_file method in Rust FFI binding for Windows Virtual Drive System

I’m relatively new to Rust FFI bindings and have been learning about how Windows handles various operations. My background is primarily in Rust, c and c++ programming for Linux-based OS, so diving into Windows is a fresh and exciting challenge for me.

I’ve been assigned a task to create a virtual drive system on Windows. So far, I’ve managed to list directories by replicating a folder from my local storage using the find_files and create_file methods.

My current understanding is that to open a file, I need to implement the read_file method, assign the file to the buffer as &[u8], and return the size as u32. However, I’ve been struggling with this for the past three days. The issue I’m facing is that the read_file method is not being called when I try to open a file.

When I attempt to open a file, I encounter an error dialogue box stating The Directory name is invalid.

I would greatly appreciate any guidance or suggestions on how to resolve this issue. Thanks in advance for your help!

CI testing

@Liryna I've sent an request to allow my AppVeyor account to access this repo. I should be able to set up CI testing once you approve the request.

BTW, documentation is complete and now I'm migrating my "yasfw" project to use this library. This way, I can make sure that this library won't cause any surprises when used in real world applications. (Acutally I've found and fixed several such problems that the unit tests failed to catch when writing the documentation, so I'm not 100% sure now) I should be able to release it to crates.io after getting this done.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.