Skip to content

Commit 81b054e

Browse files
committed
[ZEPPELIN-4574] Fixed rootNotebookFolder and noteFileName in VFSNotebookRepo.java to allow it to work on windows
1 parent 4f532aa commit 81b054e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

zeppelin-zengine/src/main/java/org/apache/zeppelin/notebook/repo/VFSNotebookRepo.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ protected void setNotebookDirectory(String notebookDirPath) throws IOException {
8888
LOGGER.info("Notebook dir doesn't exist: {}, creating it.",
8989
rootNotebookFileObject.getName().getPath());
9090
}
91-
this.rootNotebookFolder = rootNotebookFileObject.getName().getPath();
91+
this.rootNotebookFolder = rootNotebookFileObject.getName().getURI().replace("file:///", "/");
9292
}
9393

9494
@Override
@@ -110,7 +110,7 @@ private Map<String, NoteInfo> listFolder(FileObject fileObject) throws IOExcepti
110110
noteInfos.putAll(listFolder(child));
111111
}
112112
} else {
113-
String noteFileName = fileObject.getName().getPath();
113+
String noteFileName = fileObject.getName().getURI().replace("file:///", "/");
114114
if (noteFileName.endsWith(".zpln")) {
115115
try {
116116
String noteId = getNoteId(noteFileName);

0 commit comments

Comments
 (0)