Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed no Windows drives but C:\ being shown in the Data Explorer #1187

Merged
merged 1 commit into from
Nov 15, 2022

Conversation

Mailaender
Copy link
Contributor

@Mailaender Mailaender commented Nov 14, 2022

This reverts #1186 because it didn't work. The file system type is not local vs shared on Windows 10, but rather NTFS vs. FAT32 so everything was falsely detected as a network drive leaving the file explorer empty but the back fall to C:\ which might not even be allowed to access in restricted environments.

image

image

Removing default access to network drives is not an option. Usually, this is the main data source for laboratories. Hiding that behind multiple complicated options is not optimal. I therefore always assume that network drives are not empty and only check for children in the network drive root folder when the user explicitly expands the tree viewer hoping this improves application startup performance.

@Mailaender Mailaender changed the title Don't disable the cache for network drives Fixed Windows drives but C:\ being shown in the Data Explorer Nov 14, 2022
@Mailaender Mailaender changed the title Fixed Windows drives but C:\ being shown in the Data Explorer Fixed no Windows drives but C:\ being shown in the Data Explorer Nov 14, 2022
@eselmeister
Copy link
Contributor

@Mailaender You're right, it doesn't detect a local or remote (attached network drive) in a reliable way. The documenation already warned, that the type information is highly dependent on the implementation:

FileStore fileStore = Files.getFileStore(root.toPath());
String type = fileStore.type();

See:

/**
* Returns the <em>type</em> of this file store. The format of the string
* returned by this method is highly implementation specific. It may
* indicate, for example, the format used or if the file store is local
* or remote.
*
* @return  a string representing the type of this file store
*/
public abstract String type();

But I disagree to just revert the change as it not solves the problem that user reported long startup times. IMHO, it only happens on Windows, as the drives are attached on root level. On Linux and macOS, attached network drives are usually under /mnt or /media and not evaluated when setting up the "Data Explorer".

I would be fine to extend the extend the preference text field P_WINDOWS_DRIVE_TYPE and let the user type in a list of drives (local/remote) that shall be displayed. The default value for the text field could be to list:

  • C:
  • D:
  • E:

If the user wants to show all drives on Windows, the option to deactivate listing the drives by name is still available. Furthermore, via "User Location" the user can freely select any attached network drive.

Let's me prepare a solution an push it today.

I would be happy if we find a way to clearly determine on Windows whether a drive is a local or remove one, but I didn't find a solution to achieve this yet.

@Mailaender
Copy link
Contributor Author

Updated so this becomes a toggleable setting again.

@eselmeister eselmeister merged commit 08758e5 into eclipse:develop Nov 15, 2022
@Mailaender Mailaender deleted the cache-network-shares branch November 15, 2022 11:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants