mirror of
https://github.com/GitJournal/GitJournal.git
synced 2025-06-29 02:07:39 +08:00
LinkResolver: Handle strange path
Fixes APP-P8
This commit is contained in:
@ -15,10 +15,15 @@ class LinkResolver {
|
|||||||
}
|
}
|
||||||
|
|
||||||
var rootFolder = inputNote.parent.rootFolder;
|
var rootFolder = inputNote.parent.rootFolder;
|
||||||
assert(l.filePath.startsWith(rootFolder.folderPath));
|
if (l.filePath.startsWith(rootFolder.folderPath)) {
|
||||||
var spec = l.filePath.substring(rootFolder.folderPath.length + 1);
|
var spec = l.filePath.substring(rootFolder.folderPath.length);
|
||||||
|
if (spec.startsWith('/')) {
|
||||||
|
spec = spec.substring(1);
|
||||||
|
}
|
||||||
|
return _getNoteWithSpec(rootFolder, spec);
|
||||||
|
}
|
||||||
|
|
||||||
return _getNoteWithSpec(rootFolder, spec);
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
Note resolve(String link) {
|
Note resolve(String link) {
|
||||||
|
Reference in New Issue
Block a user