Fix #36: serve_flists panics on files without extension #37
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "development_36-fix-serve-flists-panic"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Fixes #36
Replaces two panic-prone
expect()calls invisit_dir_one_levelwith graceful fallbacks:Path extension:
.extension().expect(...)now uses.extension().and_then(|e| e.to_str())to handle files without extensions (e.g.,README,Makefile,.gitignore) without crashing.Pre-epoch timestamps:
.duration_since(UNIX_EPOCH).expect(...)now uses.unwrap_or_default()so files with mtimes before 1970-01-01 getlast_modified = 0instead of panicking.Changes
myfs-hub/src/server/serve_flists.rs: 3 insertions, 8 deletionsThe CI build runner is failing for all pushes to this repo, not just this PR. The
Build, test, and checkstep fails in 0 seconds with empty logs when runningsource scripts/build_lib.sh && make check test fmt-check- these files (Makefile, scripts/) are not present in the repository. All local checks (cargo fmt --check, cargo check, cargo test, cargo clippy) pass cleanly.This is a CI infrastructure/setup issue that needs to be resolved at the repository level before CI can pass.
Re-checked CI: still blocked on external CI infrastructure issue (runner fails after 5s with no logs). Will auto-retry in ~3 hours.