mirror of
https://github.com/ckaczor/sqltoolsservice.git
synced 2026-02-17 02:51:45 -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 Microsoft.SqlServer.Management.Smo;
|
||||||
using SMO = Microsoft.SqlServer.Management.Smo;
|
using SMO = Microsoft.SqlServer.Management.Smo;
|
||||||
using Microsoft.SqlTools.ServiceLayer.Management;
|
using Microsoft.SqlTools.ServiceLayer.Management;
|
||||||
using System.IO;
|
|
||||||
|
|
||||||
namespace Microsoft.SqlTools.ServiceLayer.DisasterRecovery
|
namespace Microsoft.SqlTools.ServiceLayer.DisasterRecovery
|
||||||
{
|
{
|
||||||
@@ -376,12 +375,9 @@ namespace Microsoft.SqlTools.ServiceLayer.DisasterRecovery
|
|||||||
|
|
||||||
foreach (DataRow currentRow in dataTable.Rows)
|
foreach (DataRow currentRow in dataTable.Rows)
|
||||||
{
|
{
|
||||||
var primaryFolder = Path.GetDirectoryName(primaryFilePath);
|
var filePath = (string)currentRow["FileName"];
|
||||||
var originalPath = (string)currentRow["FileName"];
|
|
||||||
var originalFileName = Path.GetFileName(originalPath);
|
|
||||||
var filePath = Path.Join(primaryFolder, originalFileName);
|
|
||||||
|
|
||||||
// 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.
|
// 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 exists = true;
|
||||||
var isXIPath = PathWrapper.IsXIPath(primaryFilePath);
|
var isXIPath = PathWrapper.IsXIPath(primaryFilePath);
|
||||||
|
|||||||
Reference in New Issue
Block a user