public bool SafeMigrate() { try { if (ShouldMigrate) { bool result = Migrate(); if (result) { Utils.GrantAccess(To); } return(result); } return(true); } catch { Utils.ShowErrorMessage("Migration ERROR", $"We are unable to move the directory '{From}' to '{To}', please move the directory with explorer"); return(false); } }
public bool SafeMigrate() { try { if (ShouldMigrate) { bool result = Migrate(); if (result) { Utils.GrantAccess(To); } return(result); } return(true); } catch (Exception e) { MessageBox.Show( $"We are unable to move the directory '{From}' to '{To}', please move the directory with explorer", "Migration ERROR", MessageBoxButton.OK, MessageBoxImage.Error); return(false); } }