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

Enabling DevHome to recognize when the same file is removed. #2725

Merged
merged 3 commits into from
Apr 24, 2024

Conversation

dhoehna
Copy link
Contributor

@dhoehna dhoehna commented Apr 22, 2024

Summary of the pull request

A user can not remove the "A file with the same name already exists" error in the DevDrive window by removing the file if they want to clone to the same location. This prevents users from cloning a DevDrive even if the file is removed.

The PR lets users add a DevDrive after getting the "A file with the same name exists" error. This can be done in two steps

  1. The user removes the offending file.
  2. The user re-enters the path (Either by browsing, or typing into the text box).

This is done in two steps.

  1. Make the location change validate the drive label.
  2. When the location changes, and the "A File already exists..." error is displayed, and the new location is the same as the old one, change Location to empty, then let it change to the "new" location.

References and relevant issues

Detailed description of the pull request / Additional comments

[ObservableProperty] will not fire a changed event if the new value is the same as the old value. Added a change to string.empty to make the validation code path light up.

Validation steps performed

Cloned a repo into a new dev drive after triggering the "A file already exists..." error.

PR checklist

Copy link
Member

@jsidewhite jsidewhite left a comment

Choose a reason for hiding this comment

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

:shipit:

@dhoehna dhoehna merged commit 3fa1032 into main Apr 24, 2024
4 checks passed
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.

After trying to create a Dev Drive where DevDrive.vhdx exists, the error persists even if the file is removed
3 participants