Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@
import java.io.OutputStream;
import java.net.URI;
import java.net.URISyntaxException;
import java.net.URLDecoder;
import java.nio.charset.StandardCharsets;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
Expand Down Expand Up @@ -114,9 +116,13 @@ private Map<String, NoteInfo> listFolder(FileObject fileObject) throws IOExcepti
noteInfos.putAll(listFolder(child));
}
} else {
// getPath() method returns a string without root directory in windows, so we use getURI() instead
// windows does not support paths with "file:///" prepended. so we replace it by "/"
String noteFileName = fileObject.getName().getURI().replace("file:///", "/");
// getPath() drops the drive on Windows, so use getURI().
// Decode URI to change %20 to spaces.
// Windows cannot handle "file:///", replace it with "/".
String noteFileName = URLDecoder.decode(
fileObject.getName().getURI(), StandardCharsets.UTF_8
).replace("file:///", "/");

if (noteFileName.endsWith(".zpln")) {
try {
String noteId = getNoteId(noteFileName);
Expand Down
Loading