handle moved dirs

[?]
Nov 17, 2025, 7:46 PM
K2SQTVJDXCETCK5KXP72JVCKUIK5V4XNBHRUHKRMOF2524D44WUAC

Dependencies

Change contents

  • edit in libflorescence/src/diff.rs at line 55
    [6.1620][7.1685:1762]()
    /// Also present in `DiffWithoutContents` to show the old path
    Move,
  • edit in inflorescence_view/src/diff.rs at line 248
    [5.8700][7.2622:2684]()
    DiffWithContents::Move => el(text(format!("Moved"))),
  • replacement in inflorescence/src/file.rs at line 185
    [4.6135][4.6135:6188]()
    if let Ok(data) = tokio::fs::read(&path).await {
    [4.6135]
    [4.6188]
    // TODO handle symlink
    if let Ok(metadata) = tokio::fs::metadata(&path).await
    && metadata.is_dir()
    {
    Msg::LoadedSrcFile {
    id,
    data: vec![],
    encoding: None,
    cache_counter,
    }
    } else if let Ok(data) = tokio::fs::read(&path).await {
  • edit in inflorescence/src/diff.rs at line 47
    [7.6768][7.6768:6819]()
    with.push(DiffWithContents::Move);
  • edit in inflorescence/src/diff.rs at line 206
    [2.7052][7.8154:8194](),[7.8194][2.7102:7152](),[3.20912][2.7102:7152](),[2.7102][2.7102:7152](),[2.7152][7.8195:8510]()
    DiffWithContents::Move => {
    debug_assert_eq!(changes_len, 1);
    let lines: Vec<_> = file_lines.map(str::to_string).collect();
    let max_line_num = lines.len();
    sections.push(Section::Unchanged(lines));
    return Combined {
    sections,
    max_line_num,
    };
    }