File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
javascript/frameworks/cap/lib/advanced_security/javascript/frameworks/cap Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -14,11 +14,12 @@ abstract class CdlObject extends JsonObject {
14
14
exists ( Location loc , JsonValue locValue |
15
15
loc = this .getLocation ( ) and
16
16
locValue = this .getPropValue ( "$location" ) and
17
+ // The path in the cds.json file is relative to the working directory used when running
18
+ // the cds compile command. In our extractor, that's always the root of the repository,
19
+ // so we can identify the entry in the `File` table by its relative path.
17
20
path =
18
- any ( File f |
19
- f .getAbsolutePath ( )
20
- .matches ( "%" + locValue .getPropValue ( "file" ) .getStringValue ( ) + ".json" )
21
- ) .getAbsolutePath ( ) .regexpReplaceAll ( "\\.json$" , "" ) and
21
+ any ( File f | f .getRelativePath ( ) = locValue .getPropValue ( "file" ) .getStringValue ( ) )
22
+ .getAbsolutePath ( ) and
22
23
if
23
24
not exists ( locValue .getPropValue ( "line" ) ) and
24
25
not exists ( locValue .getPropValue ( "col" ) )
You can’t perform that action at this time.
0 commit comments