rtk-ai/rtk

[BUG] rtk ls always reports 0B file size on Windows

Open

#1,084 创建于 2026年4月8日

在 GitHub 查看
 (1 评论) (0 反应) (0 负责人)Rust (2,914 fork)batch import
area:clibugeffort-smallfilter-qualitygood first issueneeds-reproductionplatform:windowspriority:high

仓库指标

Star
 (48,085 star)
PR 合并指标
 (平均合并 11天 1小时) (30 天内合并 45 个 PR)

描述

Description

The rtk ls command fails to report the correct file size on Windows environments, consistently returning 0B regardless of the actual file size. This is potentially dangerous as AI agents might conclude a file is empty and overwrite its content.

Steps to Reproduce

  1. Create a file with content (e.g., a markdown file with text).
  2. Run rtk ls [filename]
  3. Compare with standard ls -l or rtk stat [filename]

Actual Behavior

rtk ls reports 0B. Example:

$ rtk ls "projects.json"
Apr 6 15:16 C:/Users/WBPC.VN/.gemini/projects.json  0B

Expected Behavior

rtk ls should report the actual file size. Example of correct data retrieved via rtk stat:

$ rtk stat "projects.json"
Size: 59    Blocks: 1    regular file

Environment

  • OS: Windows 11
  • Shell: Git Bash
  • RTK Version: 0.35.0

Impact

Critical. Automated AI agents using RTK for file system analysis may inadvertently delete or overwrite data thinking the files are empty.

贡献者指南