Skip to content

Commit fae3004

Browse files
committed
chdir api needs the absolute file path
1 parent abb46fb commit fae3004

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/modules/PosixModuleBuiltins.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ public abstract static class ChdirNode extends PythonBuiltinNode {
246246
PNone chdir(String spath) {
247247
Env env = getContext().getEnv();
248248
try {
249-
TruffleFile dir = env.getTruffleFile(spath);
249+
TruffleFile dir = env.getTruffleFile(spath).getAbsoluteFile();
250250
env.setCurrentWorkingDirectory(dir);
251251
return PNone.NONE;
252252
} catch (UnsupportedOperationException | IllegalArgumentException | SecurityException e) {

0 commit comments

Comments
 (0)