diff --git a/src/Microsoft.SqlTools.ServiceLayer/DisasterRecovery/RestoreOperation/RestoreDatabaseTaskDataObject.cs b/src/Microsoft.SqlTools.ServiceLayer/DisasterRecovery/RestoreOperation/RestoreDatabaseTaskDataObject.cs index 371a6f09..f1e59472 100644 --- a/src/Microsoft.SqlTools.ServiceLayer/DisasterRecovery/RestoreOperation/RestoreDatabaseTaskDataObject.cs +++ b/src/Microsoft.SqlTools.ServiceLayer/DisasterRecovery/RestoreOperation/RestoreDatabaseTaskDataObject.cs @@ -794,6 +794,9 @@ namespace Microsoft.SqlTools.ServiceLayer.DisasterRecovery.RestoreOperation /// 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)) {