Skip to content

Commit

Permalink
Copy to proper directory
Browse files Browse the repository at this point in the history
Files were going into working directory because GetTargetDirectory() also calls $System.CSP.GetFileName.
  • Loading branch information
isc-tleavitt committed Sep 1, 2022
1 parent 755d0ea commit 873bc05
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
-

### Fixed
-
- Web application files are copied to proper target, not the current working directory

### Security
-
Expand Down
7 changes: 5 additions & 2 deletions cls/pkg/isc/ipm/js/base/processor.cls
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,11 @@ Method OnBeforePhase(pPhase As %String, ByRef pParams) As %Status
} ElseIf (pPhase = "Activate") {
// Move files to the right place.
Set sourceDir = ##class(%Library.File).NormalizeDirectory(..GetSourceDirectory())
Set targetDir = $System.CSP.GetFileName(..GetTargetDirectory())
Set targetDir = ..GetTargetDirectory()
If (targetDir = "") {
// Should never happen, but good to be safe (and avoid using working directory)
$$$ThrowStatus($$$ERROR($$$GeneralError,"Target directory not specified."))
}
Set testFile = sourceDir_"index.html"
If '##class(%Library.File).Exists(testFile) {
$$$ThrowStatus($$$ERROR($$$GeneralError,$$$FormatText("File '%1' does not exist; will not activate %2 UI changes.",testFile,..#FLAVOR)))
Expand Down Expand Up @@ -412,4 +416,3 @@ ClassMethod SanitizeWebAppBase(base As %String) As %String
}

}

0 comments on commit 873bc05

Please sign in to comment.