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

This destination already exists error displayed even after removing it from the file system #4678

Closed
sverraest opened this issue May 14, 2018 · 3 comments
Labels
bug Confirmed bugs or reports that are very likely to be bugs help wanted Issues marked as ideal for external contributors

Comments

@sverraest
Copy link

Description

When trying to clone a repository to an existing folder on the filesystem the error "this destination already exists" is displayed. After removing it from the filesystem the error is still visible. The outcome should be that it is now possible to clone to that destination

Version

  • GitHub Desktop: 1.1.1
  • Operating system: macOS Sierra 10.12.6

Steps to Reproduce

  1. Clone a repository to a folder which already has this repository
  2. Observe error
  3. Remove folder from filesystem

Expected Behavior

You should be able to clone the repository now

Actual Behavior

The error "this destination already exists" is still visible, no option to clone.

Additional Information

Logs

@shiftkey shiftkey added the bug Confirmed bugs or reports that are very likely to be bugs label May 18, 2018
@shiftkey
Copy link
Member

I think I've stumbled on this before, and it'd be nice to hook into the focus event for the app and give the dialog a chance to refresh itself:

ipcRenderer.on('focus', () => {
const { selectedState } = appStore.getState()
// Refresh the currently selected repository on focus (if
// we have a selected repository).
if (selectedState && selectedState.type === SelectionType.Repository) {
dispatcher.refreshRepository(selectedState.repository)
}
dispatcher.setAppFocusState(true)
})

This is how we update the details about the selected repository, if you were making changes in another tool and switched back to Desktop.

@shiftkey shiftkey added the help wanted Issues marked as ideal for external contributors label May 18, 2018
@Daniel-McCarthy
Copy link
Member

I am interested in taking this on. I have looked into this a bit already and have the basics of it implemented. However, I hoped to ask about it's intended behavior.

There are two immediate scenarios where a focus event could assist this:

  • An error has appeared due to the folder already existing. However, should go away if the folder now no longer exists and the user returns to the window.
  • No error is shown. However, the folder at the path now exists and should show an error.

Verifying the path on focus can handle both of these. However, it would show the error even for the default path that is given when the Clone Repository window is first opened next time onFocus is called. This might be somewhat unpleasant behavior.

Do we only want to verify the path when this error is showing? (If so, then it will not generate an error if the folder now exists, but they can find that out when clicking the 'Clone' button again.)

@shiftkey
Copy link
Member

I believe this has been fixed by #5518 but I'll test out our next beta and confirm that's the case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Confirmed bugs or reports that are very likely to be bugs help wanted Issues marked as ideal for external contributors
Projects
None yet
Development

No branches or pull requests

3 participants