Skip to content

Commit bc34004

Browse files
committed
%load magic does not recognize notebooks #114
1 parent d15044c commit bc34004

2 files changed

Lines changed: 6 additions & 2 deletions

File tree

RELEASE-NOTES.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 1.0-a8
2+
3+
* #114 %load magic does not recognize notebooks
4+
15
## 1.0-a7
26

37
* #65 mutual dependent class not working

jjava-kernel/src/main/java/org/dflib/jjava/kernel/magics/LoadCodeMagic.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@ public Void eval(JavaKernel kernel, List<String> args) throws Exception {
5050
if (Files.isRegularFile(scriptPath)) {
5151

5252
// TODO: return rendered "eval" results to the caller would make sense here
53-
54-
if (scriptPath.getFileName().endsWith(NOTEBOOK_EXTENSION)) {
53+
// ".toString()" is important; "Path.endsWith(..)" means something entirely different
54+
if (scriptPath.getFileName().toString().endsWith(NOTEBOOK_EXTENSION)) {
5555
execNotebook(kernel, scriptPath);
5656
} else {
5757
String source = Files.readString(scriptPath);

0 commit comments

Comments
 (0)