redhat-developer / intellij-common

4 stars 11 forks source link

Check if user.home folder can be used before downloading tool #189

Open sbouchet opened 1 year ago

sbouchet commented 1 year ago

see https://github.com/redhat-developer/intellij-openshift-connector/issues/538 for reported issue.

tracked down to https://github.com/redhat-developer/intellij-common/blob/f766930b2336b5c0515a6b77d41c134c03340c89/src/main/java/com/redhat/devtools/intellij/common/utils/DownloadHelper.java#L142

the issue is the user can't execute downloaded file because IJ openshift uses $HOME/.odo as destination.

proposed change if to move to System.getenv("APPDATA") for windows users?

adietish commented 1 year ago

@sbouchet I agree, System.getenv("APPDATA") seems to be the right choice for windows

App data is mutable data that is created and managed by a specific app. It includes runtime state, app settings, user preferences, reference content (such as the dictionary definitions in a dictionary app)

(source: https://learn.microsoft.com/en-us/windows/apps/design/app-settings/store-and-retrieve-app-data).

Is there a need to migrate existing data to the new location?