From 630ad805c03af271884286c52c9460a89ecfb979 Mon Sep 17 00:00:00 2001 From: Vadim1987 Date: Sun, 28 Jun 2026 22:51:32 +0200 Subject: [PATCH] fix(fs): drop truncating probe-open in desktop cp --- src/util/filesystem.lua | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/util/filesystem.lua b/src/util/filesystem.lua index 8666e3f2..70f48b46 100644 --- a/src/util/filesystem.lua +++ b/src/util/filesystem.lua @@ -375,13 +375,8 @@ else --- @return string? error function FS.cp(source, target) local src = FS.exists(source) - local tgt = io.open(target, "w") - if not src then - return false, FS.messages.cannot_open(src) - end - if not tgt then - return false, FS.messages.cannot_open(tgt) + return false, FS.messages.cannot_open(source) end local rok, cont_err = FS.read(source)