File tree Expand file tree Collapse file tree 1 file changed +18
-8
lines changed Expand file tree Collapse file tree 1 file changed +18
-8
lines changed Original file line number Diff line number Diff line change @@ -424,14 +424,24 @@ module Make<InputSig Input> {
424424 * Gets the absolute path of the file included by this directive.
425425 */
426426 private string getTargetPath ( ) {
427- exists ( string path | path = this .getValue ( ) |
428- if path .matches ( "/%" )
429- then result = path
430- else
431- result =
432- this .getDocument ( ) .getLocation ( ) .getFile ( ) .getParentContainer ( ) .getAbsolutePath ( ) + "/" +
433- path
434- )
427+ result = this .getAbsolutePath ( )
428+ or
429+ result =
430+ this .getDocument ( ) .getLocation ( ) .getFile ( ) .getParentContainer ( ) .getAbsolutePath ( ) + "/" +
431+ this .getRelativePath ( )
432+ }
433+
434+ /** Join-order helper for `getTargetPath`. Gets the path but only if it is an absolute path. */
435+ private string getAbsolutePath ( ) {
436+ result = this .getValue ( ) and
437+ result .matches ( "/%" )
438+ }
439+
440+ /** Join-order helper for `getTargetPath`. Gets the path, but only if it is a relative path. */
441+ pragma [ noinline]
442+ private string getRelativePath ( ) {
443+ result = this .getValue ( ) and
444+ not result .matches ( "/%" )
435445 }
436446 }
437447
You can’t perform that action at this time.
0 commit comments