Color books: one branch names an imported .acb or a temporary copy after the book (#3003)

This commit is contained in:
bflatastic
2026-10-20 01:48:34 +07:00
parent de8492b90c
commit 197cf0ba67
+1 -7
View File
@@ -277,13 +277,7 @@ impl<L: LibraryFile> Libraries<L> {
let base = file_name(&p);
// Color books (.acb) name the tab from the book title inside the file; a sandbox
// copy of an import often lands as tmp….tmp.acb (#2996).
let file = if ext == "acb" {
library_file_name(lib.name(), &ext)
} else if temporary_library_file_name(&base) {
library_file_name(lib.name(), &ext)
} else {
base
};
let file = if ext == "acb" || temporary_library_file_name(&base) { library_file_name(lib.name(), &ext) } else { base };
(file, read_file(&p)?)
}
None => (library_file_name(lib.name(), ext), encode(&lib)?),