Skip to content

Commit 84764f2

Browse files
committed
migrate away from deprecated TruffleFile APIs
1 parent 95f5007 commit 84764f2

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/util/FileDeleteShutdownHook.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ public FileDeleteShutdownHook(String path) {
5454

5555
@Override
5656
public void call(PythonContext context) {
57-
TruffleFile truffleFile = context.getEnv().getTruffleFile(path);
57+
TruffleFile truffleFile = context.getEnv().getPublicTruffleFile(path);
5858
try {
5959
truffleFile.delete();
6060
} catch (IOException ignored) {}

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/util/TempFileUtils.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ public static String getRandomFilePath(String path, String prefix, String suffix
8080

8181
while (true) {
8282
String tmpPath = path + env.getFileNameSeparator() + prefix + getRandomString(8) + suffix;
83-
TruffleFile tmpFile = env.getTruffleFile(tmpPath);
83+
TruffleFile tmpFile = env.getPublicTruffleFile(tmpPath);
8484
if (!tmpFile.exists()) {
8585
tmpFile.createFile();
8686
options.remove(StandardOpenOption.CREATE_NEW);

0 commit comments

Comments
 (0)