mhx / dwarfs

A fast high compression read-only file system for Linux, Windows and macOS
GNU General Public License v3.0
2.13k stars 56 forks source link

failed opening file: The system cannot find the file specified. (windows) #196

Closed samuelwatsonofficial closed 7 months ago

samuelwatsonofficial commented 7 months ago

I was testing this for the first time on windows (dwarfs 0.9.5) and have not been able to get it working yet as I keep recieving this error message:

E 21:47:50.362609 error initializing file system: struct boost::wrapexcept: failed opening file: The system cannot find the file specified. E ............... : iostream stream error

I have tried moving the input filesystem and mount point to be in the same directory as the dwarfs.exe being used but nothing has worked so far, any help would be appreatiated whether it be a fix or a correction in my method. The command I have used is: .\dwarfs.exe C:\Users\darth\Downloads\final2.dwarfs C:\Users\darth\Downloads\dwarfs I have tried the universal binary along with the other binary, mkdwarfs worked perfectly however now it is having trouble finding the files. I hope there is an easy fix or I can provide any needed information.

mhx commented 7 months ago

I was testing this for the first time on windows (dwarfs 0.9.5) and have not been able to get it working yet as I keep recieving this error message:

E 21:47:50.362609 error initializing file system: struct boost::wrapexcept: failed opening file: The system cannot find the file specified. E ............... : iostream stream error

Admittedly, that error message is not super useful.

I have tried moving the input filesystem and mount point to be in the same directory as the dwarfs.exe being used but nothing has worked so far, any help would be appreatiated whether it be a fix or a correction in my method. The command I have used is: .\dwarfs.exe C:\Users\darth\Downloads\final2.dwarfs C:\Users\darth\Downloads\dwarfs

This doesn't look wrong per se. I can try this on my Windows VM in all shapes and forms and it works without problems:

C:\Users\mhx\git\dwarfs\build-vcpkg>.\dwarfs.exe ic405-S20.dwarfs mnt
The service dwarfs has been started.
The service dwarfs has been stopped.

C:\Users\mhx\git\dwarfs\build-vcpkg>.\dwarfs.exe ic405-S20.dwarfs C:\bin\mnt
The service dwarfs has been started.
The service dwarfs has been stopped.

C:\Users\mhx\git\dwarfs\build-vcpkg>.\dwarfs.exe Z:\ic405-S20.dwarfs C:\bin\mnt
The service dwarfs has been started.
The service dwarfs has been stopped.

So it doesn't really matter where the image is located and where it's supposed to be mounted.

There are a couple of different error scenarios. First, attempting to mount to an existing directory:

C:\Users\mhx\git\dwarfs\build-vcpkg>.\dwarfs.exe Z:\ic405-S20.dwarfs C:\bin
Cannot create WinFsp-FUSE file system: mount point in use.

Attempting to mount to a non-existing hierarchy:

C:\Users\mhx\git\dwarfs\build-vcpkg>.\dwarfs.exe ic405-S20.dwarfs mnt\xxx\yyy
Cannot create WinFsp-FUSE file system: invalid mount point.

Last but not least, attempting to mount a non-existing image:

C:\Users\mhx\git\dwarfs\build-vcpkg>.\dwarfs.exe ic405-doesnotexist.dwarfs mnt
E 08:33:13.405891 error initializing file system: struct boost::wrapexcept<class std::ios_base::failure>: failed opening file: The system cannot find the file specified.
E ............... : iostream stream error

And this is exactly where the error you're seeing shows up for me.

Are you 100% certain that the DwarFS image you're trying to mount exists in the place you're expecting it?

I have tried the universal binary along with the other binary, mkdwarfs worked perfectly however now it is having trouble finding the files.

So you're also having a problem with mkdwarfs now? Or just dwarfs? I'm confused.

I hope there is an easy fix or I can provide any needed information.

Please do, as I don't see any error I could reproduce on my side yet.

samuelwatsonofficial commented 7 months ago

Ah damn this was totally my fault, I was sure I had checked every variation of paths and where the files were; in the end I had named the file first.dwarfs and I thought the name was final.dwarfs. Sorry about reporting this, I was just very sure I had double checked everything. Would it be possible to add an error saying which file is not located? If not, that's fine because it was an error on my part.

mhx commented 7 months ago

Ah damn this was totally my fault, I was sure I had checked every variation of paths and where the files were; in the end I had named the file first.dwarfs and I thought the name was final.dwarfs. Sorry about reporting this, I was just very sure I had double checked everything. Would it be possible to add an error saying which file is not located? If not, that's fine because it was an error on my part.

Definitely, this is on my list for the next release.

Glad you found the issue!