fix the backup file path of a db file that's created in different platform (#493)

This commit is contained in:
Leila Lali
2017-10-11 15:43:45 -07:00
committed by GitHub
parent 077ce4de1b
commit 89d01000e9

View File

@@ -794,6 +794,9 @@ namespace Microsoft.SqlTools.ServiceLayer.DisasterRecovery.RestoreOperation
/// <returns></returns>
private string GetTargetDbFilePhysicalName(string sourceDbFilePhysicalLocation)
{
string pathSeparator = PathWrapper.PathSeparatorFromServerConnection(Server.ConnectionContext);
sourceDbFilePhysicalLocation = sourceDbFilePhysicalLocation.Replace("/", pathSeparator);
sourceDbFilePhysicalLocation = sourceDbFilePhysicalLocation.Replace("\\", pathSeparator);
string fileName = Path.GetFileName(sourceDbFilePhysicalLocation);
if (!string.IsNullOrEmpty(this.SourceDatabaseName) && !string.IsNullOrEmpty(this.targetDbName))
{