Skip to content

v4.2.15

Latest

Choose a tag to compare

@github-actions github-actions released this 29 Oct 18:21

blitcp 4.2.15

If you installed 4.2.14 on Windows, upgrade. 4.2.14 refused every binary
file of 1 MB or more in a local copy on Windows.

Its new source pre-flight reads five regions of each large file before the
copy starts, and it read them as text: on Windows a descriptor from
os.open() is text mode, so CR LF came back as LF and the byte 0x1A ended the
read. Almost every binary file has one of those in its first megabyte. The
probe reported short read: 5 of 1048576 bytes, counted the file as failed and
did not copy it, and the run printed failed, not written and exited 1.
Nothing was written incorrectly — the affected files were not written at all.
The probe now reads through the same binary file object the copy loop uses.

Linux and macOS were not affected. The 4.2.14 release has been withdrawn, so
everything it brought is listed below — 4.2.15 contains all of it.

Also in this release — the changes from 4.2.14

A copy that fails now says why, the source is checked before it is read, the
clock stops after the data is on disk, and the GUI stays responsive while it
browses — and shows its own version.

Nothing that used to run stops running by default. The new source checks
warn; only --strict-integrity and --strict-locks turn a finding into a
failure. A file whose read fails during the pre-flight probe is reported and
not copied — it is the file the copy would have failed on.

  • Three checks on the source of a local copy: a file whose hash changed
    while its size and mtime did not (possible media fault); the source device —
    bus, removable, dirty volume — with a short read probe of every large file;
    and a file held open or locked by another process, such as a running backup
    job. A Warnings: line in DONE counts what they found.

  • A copy error names the call, the side and the path — read or write,
    source or destination, how far the file had got, the Windows error code when
    it can be read, and what became of the partial file. [Errno 13] Permission denied alone no longer happens.

  • Verification says NOT VERIFIED (copy failed: …) for a file that was never
    written, and CORRUPTED only after a comparison disagreed. The summary
    counts a failed file as failed, not as copied and written.

  • Time: and the phase table use the same clock.

  • A pull flushes the destination, and a push or relay syncs the remote one,
    before the clock stops.

  • The progress bar's ETA matches the rate printed beside it.

  • GUI: shows its real version (every GUI since v4.2.3 said 4.2.3); browsing
    a remote folder no longer freezes the window — listings run in the
    background, one level at a time, with Cancel; the transfer log is capped at
    10,000 lines instead of growing for as long as the copy runs.

  • An SSH host that does not resolve or answer ends in one error line, not a
    traceback.

  • A saved SMB share written as refs/ joins correctly, and a saved
    connection's name typed as an SSH host gets "Did you mean …?".

  • An elevated Windows copy no longer refuses files at random; stdin from NUL
    is no longer taken for a terminal on Windows.

  • Destination paths are resolved through directory descriptors (openat2
    where available) with the same checks, and the progress bar no longer goes
    silent in the link and metadata passes.

Full notes: CHANGELOG.md


如果你在 Windows 上安装了 4.2.14,请升级。 在 Windows 上,4.2.14 的本地复制会
拒绝所有 1 MB 及以上的二进制文件。

它新增的源文件预检会在复制开始之前读取每个大文件的五个区域,而它是以文本方式读取的:
在 Windows 上,os.open() 得到的描述符是文本模式,于是 CR LF 被读成 LF,字节 0x1A
会结束读取。几乎每个二进制文件的第一个 MB 里都有其中之一。探测报告
short read: 5 of 1048576 bytes,把文件计为失败且不复制它,运行打印
failed, not written 并以 1 退出。没有任何东西被写错——受影响的文件根本没有被写入。
现在探测通过复制循环所使用的同一个二进制文件对象来读取。

Linux 和 macOS 不受影响。4.2.14 的发布已撤回,因此它带来的全部内容列在下面——4.2.15 包含了这一切。

本版本同样包含——4.2.14 的改动

复制失败时现在会说明原因,源文件在读取之前会先被检查,计时在数据落盘之后才停止,
GUI 在浏览时保持响应——并且显示它自己的正确版本。

默认情况下,原本能运行的任务不会因此停止。 新的源文件检查只发出警告;只有
--strict-integrity 和 --strict-locks 会把发现的问题变成失败。在预检探测中读取
失败的文件会被报告且不会被复制——它正是复制本来会在其上失败的那个文件。

  • 对本地复制的源文件做三项检查: 大小和 mtime 未变而哈希变了的文件(可能的
    介质故障);源设备——总线、是否可移除、卷是否为脏——并对每个大文件做简短的读取
    探测;以及被其他进程打开或锁定的文件,例如正在运行的备份任务。DONE 中的
    Warnings: 行会统计发现的情况。

  • 复制错误会指明调用、哪一端和路径——读还是写、源还是目标、文件已复制到哪里、
    能读取时给出 Windows 错误码,以及那个不完整的文件最后怎样了。不会再只出现一句
    [Errno 13] Permission denied。

  • 对从未写入的文件,校验显示 NOT VERIFIED (copy failed: …);只有比较确实不一致
    时才显示 CORRUPTED。汇总把失败的文件算作失败,而不是已复制、已写入。

  • Time: 和阶段表使用同一个时钟。

  • 拉取会先刷新目标,推送或中继会先同步远端目标,然后才停止计时。

  • 进度条的 ETA 与旁边显示的速率一致。

  • GUI: 显示真实版本(自 v4.2.3 以来每个 GUI 都显示 4.2.3);浏览远程文件夹
    不再让窗口卡死——列目录在后台进行,每次一层,可以取消;传输日志最多保留 10,000
    行,不再随复制一直增长。

  • 无法解析或不响应的 SSH 主机以一行错误结束,而不是一段 traceback。

  • 保存为 refs/ 的 SMB 共享能正确拼接;把已保存连接的名称当作 SSH 主机输入时,
    会得到 "Did you mean …?"。

  • 提权的 Windows 复制不再随机拒绝文件;在 Windows 上,来自 NUL 的 stdin 不再被
    当作终端。

  • 目标路径通过目录描述符解析(可用时使用 openat2),检查不变;进度条在链接和
    元数据阶段不再沉默。

完整说明见 CHANGELOG.zh-CN.md