mirror of
https://github.com/ckaczor/sqltoolsservice.git
synced 2026-01-13 17:23:02 -05:00
Use original file paths when getting associated DB files (#2263)
This commit is contained in:
@@ -14,7 +14,6 @@ using Microsoft.SqlServer.Management.Sdk.Sfc;
|
||||
using Microsoft.SqlServer.Management.Smo;
|
||||
using SMO = Microsoft.SqlServer.Management.Smo;
|
||||
using Microsoft.SqlTools.ServiceLayer.Management;
|
||||
using System.IO;
|
||||
|
||||
namespace Microsoft.SqlTools.ServiceLayer.DisasterRecovery
|
||||
{
|
||||
@@ -376,12 +375,9 @@ namespace Microsoft.SqlTools.ServiceLayer.DisasterRecovery
|
||||
|
||||
foreach (DataRow currentRow in dataTable.Rows)
|
||||
{
|
||||
var primaryFolder = Path.GetDirectoryName(primaryFilePath);
|
||||
var originalPath = (string)currentRow["FileName"];
|
||||
var originalFileName = Path.GetFileName(originalPath);
|
||||
var filePath = Path.Join(primaryFolder, originalFileName);
|
||||
var filePath = (string)currentRow["FileName"];
|
||||
|
||||
// Check if file exists with the constructed path.
|
||||
// Check if file exists with the provided path.
|
||||
// If it's an XI (XStore Integration) path, then assume it exists, otherwise retrieve info for the file to check if it exists.
|
||||
var exists = true;
|
||||
var isXIPath = PathWrapper.IsXIPath(primaryFilePath);
|
||||
|
||||
Reference in New Issue
Block a user