mirror of
https://github.com/GitJournal/GitJournal.git
synced 2025-06-27 09:06:43 +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;
|
||||
assert(l.filePath.startsWith(rootFolder.folderPath));
|
||||
var spec = l.filePath.substring(rootFolder.folderPath.length + 1);
|
||||
if (l.filePath.startsWith(rootFolder.folderPath)) {
|
||||
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) {
|
||||
|
Reference in New Issue
Block a user