Skip to content

Conversation

NicholasChin28
Copy link
Contributor

@NicholasChin28 NicholasChin28 commented Sep 20, 2025

Resolved / Related Issues

Steps used to test these changes

  1. Download and install RaiDrive client application
  2. Configure RaiDrive to mount an SFTP server connection via the RaiDrive GUI client
  3. Verify the SFTP drive appears in Windows File Explorer as a network location
image
  1. Attempt to access the RaiDrive SFTP drive using the Files application
  2. Upon step debugging through AuthenticateNetworkShare function, observe that
    RaiDrive SFTP paths follow the format \RaiDrive-{username}{drive-custom-name}\
image image
  1. Notice that WNetAddConnection3W fails when attempting to resolve the RaiDrive
    remoteName with either ERROR_BAD_NET_NAME or ERROR_NO_NET_OR_BAD_PATH
image
  1. After applying the fix, successfully access RaiDrive SFTP drives through Files
    application without errors

  2. Checked with SSHFS to test behavior.

image image image
  1. SSHFS connecting to a SFTP server seems fine as it does prompt user to key in credentials and after inputting details the folder is accessible.

- RaiDrive seems to use a custom UNC path with the format of \\RaiDrive-{user}\{drive-custom-name}
@yaira2 yaira2 changed the title Added conditional checking for RaiDrive network path Fix: Added conditional checking for RaiDrive network path Sep 21, 2025
// Skip authentication for RaiDrive virtual shares
// RaiDrive creates virtual UNC paths that don't work with Windows networking APIs
// Format is \\RaiDrive-{user}\{drive-custom-name}\
if (path.StartsWith(@"\\RaiDrive-", StringComparison.OrdinalIgnoreCase))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we create a constant for this?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have updated the code to use a string array constant for a list of virtual drive providers

@Josh65-2201
Copy link
Member

Josh65-2201 commented Sep 25, 2025

Could this also apply to #17636 based on the site it's a separate program that adds a virtual network drive too

- Added constant array of virtual disk providers
@NicholasChin28 NicholasChin28 changed the title Fix: Added conditional checking for RaiDrive network path Fix: Added conditional checking for virtual network path Sep 27, 2025
@NicholasChin28
Copy link
Contributor Author

NicholasChin28 commented Sep 27, 2025

I had a look at #17636 and it seems to have a similar issue. When testing:

  • The lock/authenticated status of the virtual drive is controlled from the Cryptomator desktop app
  • In the Windows File Explorer, once the drive has been unlocked, it immediately allows access without prompting for login credentials
  • I assume this is because its already unlocked so it should not prompt/require the user to re-enter the details

Another potentially related issue is #17521

  • For this one, it has a similar behavior to RaiDrive in the original comment

@NicholasChin28
Copy link
Contributor Author

I have updated the code to maintain a list of providers that seems to be using a virtual network drive. I'm not sure if we want to include the checks for both Cryptomator and Egnyte in this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug: Opening network drive from RaiDrive shows ERROR_BAD_NET_NAME
3 participants