@@ -10,16 +10,16 @@ class File extends Container {
1010
1111 /** DEPRECATED: Use `getAbsolutePath` instead. */
1212 deprecated override string getName ( ) {
13- files ( this , result , _ , _ , _ )
13+ result = this . getAbsolutePath ( )
1414 }
1515
1616 /** DEPRECATED: Use `getAbsolutePath` instead. */
1717 deprecated string getFullName ( ) {
18- result = getName ( )
18+ result = this . getAbsolutePath ( )
1919 }
2020
2121 predicate hasLocationInfo ( string filepath , int bl , int bc , int el , int ec ) {
22- this .getName ( ) = filepath and bl = 0 and bc = 0 and el = 0 and ec = 0
22+ this .getAbsolutePath ( ) = filepath and bl = 0 and bc = 0 and el = 0 and ec = 0
2323 }
2424
2525 /** Whether this file is a source code file. */
@@ -98,7 +98,7 @@ class Folder extends Container {
9898
9999 /** DEPRECATED: Use `getAbsolutePath` instead. */
100100 deprecated override string getName ( ) {
101- folders ( this , result , _ )
101+ result = this . getAbsolutePath ( )
102102 }
103103
104104 /** DEPRECATED: Use `getBaseName` instead. */
@@ -107,7 +107,7 @@ class Folder extends Container {
107107 }
108108
109109 predicate hasLocationInfo ( string filepath , int bl , int bc , int el , int ec ) {
110- this .getName ( ) = filepath and bl = 0 and bc = 0 and el = 0 and ec = 0
110+ this .getAbsolutePath ( ) = filepath and bl = 0 and bc = 0 and el = 0 and ec = 0
111111 }
112112
113113 override string getAbsolutePath ( ) {
@@ -427,11 +427,11 @@ class Location extends @location {
427427 }
428428
429429 string toString ( ) {
430- result = this .getPath ( ) .getName ( ) + ":" + this .getStartLine ( ) .toString ( )
430+ result = this .getPath ( ) .getAbsolutePath ( ) + ":" + this .getStartLine ( ) .toString ( )
431431 }
432432
433433 predicate hasLocationInfo ( string filepath , int bl , int bc , int el , int ec ) {
434- exists ( File f | f .getName ( ) = filepath |
434+ exists ( File f | f .getAbsolutePath ( ) = filepath |
435435 locations_default ( this , f , bl , bc , el , ec )
436436 or
437437 exists ( Module m | m .getFile ( ) = f |
@@ -445,7 +445,7 @@ class Location extends @location {
445445class Line extends @py_line {
446446
447447 predicate hasLocationInfo ( string filepath , int bl , int bc , int el , int ec ) {
448- exists ( Module m | m .getFile ( ) .getName ( ) = filepath and
448+ exists ( Module m | m .getFile ( ) .getAbsolutePath ( ) = filepath and
449449 el = bl and bc = 1 and
450450 py_line_lengths ( this , m , bl , ec ) )
451451 }
0 commit comments