Skip to content

Commit 258ab64

Browse files
author
Kirill Kravtsov
committed
moving path cleanup to the class
1 parent a322c77 commit 258ab64

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

internal/classes/DBOps.class.ps1

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -969,6 +969,8 @@ class DBOpsFile : DBOps {
969969
}
970970
[string] GetPackagePath() {
971971
$pPath = $this.PackagePath
972+
# removing odd symbols
973+
$pPath = $pPath -replace ':',''
972974
if ($this.Parent) {
973975
if ($parentPath = $this.Parent.GetPackagePath()) {
974976
$pPath = Join-Path $this.Parent.GetPackagePath() $pPath
@@ -978,6 +980,8 @@ class DBOpsFile : DBOps {
978980
}
979981
[string] GetDeploymentPath () {
980982
$dPath = $this.PackagePath
983+
# removing odd symbols
984+
$dPath = $dPath -replace ':',''
981985
if ($this.Parent) {
982986
if ($parentPath = $this.Parent.GetDeploymentPath()) {
983987
$dPath = Join-Path $this.Parent.GetDeploymentPath() $dPath

internal/functions/Get-DbopsFile.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
# replace ^.\ ^./ ^\\ and :
3636
$slash = [IO.Path]::DirectorySeparatorChar
3737
$slashRegex = [Regex]::Escape(".$slash")
38-
$pkgPath = $pkgPath -replace "^$slashRegex|^\\\\|:", ''
38+
$pkgPath = $pkgPath -replace "^$slashRegex|^\\\\", ''
3939
[DBOpsFile]::new($childItem, $pkgPath, $true)
4040
}
4141
}

0 commit comments

Comments
 (0)