File tree Expand file tree Collapse file tree 2 files changed +9
-4
lines changed
com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base Expand file tree Collapse file tree 2 files changed +9
-4
lines changed Original file line number Diff line number Diff line change 11/*
2- * Copyright (c) 2014, 2018 , Oracle and/or its affiliates. All rights reserved.
2+ * Copyright (c) 2014, 2019 , Oracle and/or its affiliates. All rights reserved.
33 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44 *
55 * This code is free software; you can redistribute it and/or modify it
3030import com .oracle .truffle .r .nodes .builtin .RBuiltinNode ;
3131import com .oracle .truffle .r .runtime .builtins .RBuiltin ;
3232import com .oracle .truffle .r .runtime .data .RDataFactory ;
33+ import com .oracle .truffle .r .runtime .data .RNull ;
3334import com .oracle .truffle .r .runtime .ffi .BaseRFFI ;
3435import com .oracle .truffle .r .runtime .ffi .RFFIFactory ;
3536
@@ -42,6 +43,9 @@ public abstract class Getwd extends RBuiltinNode.Arg0 {
4243 @ TruffleBoundary
4344 protected Object getwd () {
4445 String result = getwdNode .execute ();
45- return RDataFactory .createStringVector (result );
46+ if (result != null ) {
47+ return RDataFactory .createStringVector (result );
48+ }
49+ return RNull .instance ;
4650 }
4751}
Original file line number Diff line number Diff line change 11/*
2- * Copyright (c) 2014, 2018 , Oracle and/or its affiliates. All rights reserved.
2+ * Copyright (c) 2014, 2019 , Oracle and/or its affiliates. All rights reserved.
33 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44 *
55 * This code is free software; you can redistribute it and/or modify it
3535import com .oracle .truffle .r .runtime .RError ;
3636import com .oracle .truffle .r .runtime .Utils ;
3737import com .oracle .truffle .r .runtime .builtins .RBuiltin ;
38+ import com .oracle .truffle .r .runtime .data .RNull ;
3839import com .oracle .truffle .r .runtime .ffi .BaseRFFI ;
3940import com .oracle .truffle .r .runtime .ffi .RFFIFactory ;
4041
@@ -60,7 +61,7 @@ protected Object setwd(String path) {
6061 } else {
6162 String nwdAbs = getwdNode .execute ();
6263 Utils .updateCurwd (nwdAbs );
63- return owd ;
64+ return owd != null ? owd : RNull . instance ;
6465 }
6566 }
6667}
You can’t perform that action at this time.
0 commit comments