Skip to content

Commit

Permalink
Merge pull request #529 from intersystems/v1-fix-filepath-casing
Browse files Browse the repository at this point in the history
fix: ignore case when checking for file existence
  • Loading branch information
isc-shuliu authored Jul 30, 2024
2 parents 355974b + 71c5cbf commit 6c2fe9c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/cls/IPM/ResourceProcessor/Default/Document.cls
Original file line number Diff line number Diff line change
Expand Up @@ -151,19 +151,19 @@ Method OnPhase(pPhase As %String, ByRef pParams, Output pResourceHandled As %Boo

Set tResourcePath = tResourcePath _ tFileExtension

If ($$$lcase(tFileExtension)'=".xml")&&('##class(%File).Exists(tResourcePath)) {
If ($$$lcase(tFileExtension)'=".xml")&&('##class(%IPM.Utils.File).Exists(tResourcePath)) {
Set tResourcePathXML = tResourcePath
Set $PIECE(tResourcePath, ".", *) = "xml"
If (##class(%File).Exists(tResourcePathXML)) {
If (##class(%IPM.Utils.File).Exists(tResourcePathXML)) {
Set tResourcePath = tResourcePathXML
Set ..Format = "XML"
}
}

If ($$$lcase(tFileExtension)=".mac")&&('##class(%File).Exists(tResourcePath)) {
If ($$$lcase(tFileExtension)=".mac")&&('##class(%IPM.Utils.File).Exists(tResourcePath)) {
Set tResourcePathRTN = tResourcePath
Set $Piece(tResourcePathRTN, ".", *) = "rtn"
If (##class(%File).Exists(tResourcePathRTN)) {
If (##class(%IPM.Utils.File).Exists(tResourcePathRTN)) {
Set tResourcePath = tResourcePathRTN
}
}
Expand Down

0 comments on commit 6c2fe9c

Please sign in to comment.