Skip to content

Commit 382c7df

Browse files
committed
Fix spawning window on new scheme
1 parent 1eed903 commit 382c7df

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

‎src/core/mod.rs‎

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -380,7 +380,13 @@ impl SchemeSync for OrbitalHandler {
380380
fn open(&mut self, path: &str, _flags: usize, _ctx: &CallerCtx) -> syscall::Result<OpenResult> {
381381
let mut parts = path.split('/');
382382

383-
let flags = parts.next().unwrap_or("");
383+
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+
};
384390

385391
let x = parts.next().unwrap_or("").parse::<i32>().unwrap_or(0);
386392
let y = parts.next().unwrap_or("").parse::<i32>().unwrap_or(0);

0 commit comments

Comments
 (0)