keybase / client

Keybase Go Library, Client, Service, OS X, iOS, Android, Electron
BSD 3-Clause "New" or "Revised" License
8.89k stars 1.23k forks source link

KBFS mounts as a "local disk" on Windows, but should be considered a network drive #8627

Open 00dani opened 7 years ago

00dani commented 7 years ago

The current behaviour causes issues when programs attempt to recurse through "all local drives" - for example, this is the default behaviour of WinDirStat, and when it tries to count up the file sizes inside K: things get really messy. Additionally, labeling as a local drive is misleading to the user, since KBFS won't work without Internet access.

I believe specially mounted drives on Windows do have control of what "kind" of drive they show up as, since VeraCrypt can mount drives as local or as removable. Could Keybase therefore change its mount behaviour and mark K: as a network drive instead?

junderw commented 7 years ago

super ack

zapu commented 7 years ago

Hey @00dani welcome back! Fixing this probably depends if Dokany is able to do it. @zanderz will know more.

zanderz commented 7 years ago

I forget the details, @taruti ?

mook-as commented 6 years ago

Hi! First of all: sorry, I have no idea what I'm doing.

Dokan does have network drive support, but it needs an extra DLL (see bottom of the doxygen overview, section Network Provider). It may be close enough to mark it as removable instead.

Thanks for this cool thing!

taruti commented 6 years ago

Making it appear removable works:

There is some support built in into the binary. There is an internal command line flag to kbfsdokan called -mount-flags that has the default value of dokan.CurrentSession. Flags include:

#define DOKAN_OPTION_REMOVABLE 32     // use removable drive
#define DOKAN_OPTION_MOUNT_MANAGER 64 // use mount manager
#define DOKAN_OPTION_CURRENT_SESSION 128 // mount the drive on current session only

So to try out current session and removable we would use 32|128 i.e. -mount-flags 160.