Skip to content

Commit 7416792

Browse files
committed
Python: Fix filename example
I got my eyes on this one since it was using a deprecated method, BUT it was also doing the thing, since File.getName() is the same as File.getAbsolutePath(), and that doesn't match the description :\
1 parent b9ecf1a commit 7416792

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

python/ql/examples/snippets/filename.ql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,5 @@
88
import python
99

1010
from File f
11-
where f.getName() = "spam.py"
11+
where f.getShortName() = "spam.py"
1212
select f

0 commit comments

Comments
 (0)