From c5a00ef0f82656ee5227b92349fb0071704e112e Mon Sep 17 00:00:00 2001 From: Christoph Hagen Date: Tue, 7 Jan 2025 14:03:21 +0100 Subject: [PATCH] Fix file rename --- CHDataManagement/Storage/Storage.swift | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/CHDataManagement/Storage/Storage.swift b/CHDataManagement/Storage/Storage.swift index f919f93..d52f687 100644 --- a/CHDataManagement/Storage/Storage.swift +++ b/CHDataManagement/Storage/Storage.swift @@ -286,11 +286,14 @@ final class Storage: ObservableObject { } /** - Move (rename) a file resource. + Move (rename) a file resource (moves file content and file info) */ func move(file fileId: String, to newId: String) -> Bool { guard let contentScope else { return false } - return contentScope.move(filePath(file: fileId), to: filePath(file: newId)) + guard contentScope.move(filePath(file: fileId), to: filePath(file: newId)) else { + return false + } + return contentScope.move(fileInfoPath(file: fileId), to: fileInfoPath(file: newId)) } /**