There was an error while loading. Please reload this page.
1 parent 1eed903 commit 382c7dfCopy full SHA for 382c7df
src/core/mod.rs
@@ -380,7 +380,13 @@ impl SchemeSync for OrbitalHandler {
380
fn open(&mut self, path: &str, _flags: usize, _ctx: &CallerCtx) -> syscall::Result<OpenResult> {
381
let mut parts = path.split('/');
382
383
- let flags = parts.next().unwrap_or("");
+ let path_first_char = path.chars().nth(0).unwrap_or('\0');
384
+ let flags = if path_first_char.is_ascii_digit() {
385
+ // empty flag on new scheme `/scheme/orbital//` is assumed as one slash
386
+ ""
387
+ } else {
388
+ parts.next().unwrap_or("")
389
+ };
390
391
let x = parts.next().unwrap_or("").parse::<i32>().unwrap_or(0);
392
let y = parts.next().unwrap_or("").parse::<i32>().unwrap_or(0);
0 commit comments