Update restore service to return default backup folder (#475)

* Fix restore to return default backup folder

* fix break

* fix tests

* fix file validator for invalid filepath
This commit is contained in:
Kate Shin
2017-10-03 16:11:30 -07:00
committed by GitHub
parent 05702182ab
commit d30b9c870d
8 changed files with 34 additions and 14 deletions

View File

@@ -142,7 +142,7 @@ namespace Microsoft.SqlTools.ServiceLayer.DisasterRecovery
{
BackupConfigInfo configInfo = new BackupConfigInfo();
configInfo.RecoveryModel = GetRecoveryModel(databaseName);
configInfo.DefaultBackupFolder = GetDefaultBackupFolder();
configInfo.DefaultBackupFolder = CommonUtilities.GetDefaultBackupFolder(this.serverConnection);
configInfo.LatestBackups = GetLatestBackupLocations(databaseName);
configInfo.BackupEncryptors = GetBackupEncryptors();
return configInfo;
@@ -338,11 +338,6 @@ namespace Microsoft.SqlTools.ServiceLayer.DisasterRecovery
return recoveryModel.ToString();
}
public string GetDefaultBackupFolder()
{
return this.backupRestoreUtil.GetDefaultBackupFolder();
}
/// <summary>
/// Return the latest backup locations
/// </summary>