Commit graph

16 commits

Author SHA1 Message Date
MihailRis
eb2afe822d cleanup
Some checks are pending
x86-64 AppImage / build-appimage (ubuntu-22.04) (push) Waiting to run
Build / Build (push) Waiting to run
Macos Build / build-dmg (push) Waiting to run
Windows Build (CLang) / build-windows (clang, windows-latest) (push) Waiting to run
MSVC Build / build-windows (windows-2022) (push) Waiting to run
2026-10-11 13:05:30 +03:00
ostermine
0efabc1883 remove comments only relevant to the PR 2026-10-10 18:41:37 +03:00
ostermine
a56158b78e fix crash in create_zip for files without modification time
MemoryDevice::lastWriteTime returns file_time_type::min(). Converting
it to the system clock overflows, and on Windows std::localtime returns
nullptr for the resulting time, which was dereferenced
(access violation in zip_files test on MSVC).

Unknown or out of range time is now written as 1980-01-01 00:00,
the earliest MS-DOS date.
2026-10-10 16:39:20 +03:00
ostermine
fa5466f675 fix zip archives paths and add zip files test
- create_zip from a subdirectory wrote entry names with a leading
  '/', so the mounted archive looked empty
- memory_ostream did not support tellp(), so create_zip into a memory
  device wrote invalid offsets (-1) to the archive
- ZipFileDevice added missing parent directories for the first entry
  only
- ZipFileDevice::exists returned false for the archive root
- MemoryDevice::mkdirs recreated existing directories, dropping their
  content (mkdir("a/b") cleared "a"); overwriting a file duplicated its
  name in the directory listing

Added dev/tests/zip_files.lua: builds archives with file.create_zip
from memory device root, subdirectories and the real filesystem,
mounts them and checks reading, listing and read-only access.
memory_filesystem.lua got checks for the MemoryDevice issues.

Closes #544
2026-10-10 15:54:28 +03:00
MihailRis
dae7d10a74 fix 2025-11-16 17:38:05 +03:00
MihailRis
a086b726c6 add file.create_zip(...) 2025-03-17 23:16:50 +03:00
MihailRis
6286096b57 fix ZipFileDevice::list 2025-03-17 23:00:36 +03:00
MihailRis
7facc33a7e cleanup 2025-02-26 00:22:57 +03:00
MihailRis
b52cc1aea0 fix ZipFileDevice::list for root path 2025-02-25 23:04:31 +03:00
MihailRis
bd614c5f2e enable deflate compression in io::write_zip 2025-02-25 22:49:31 +03:00
MihailRis
57d05bde57 add io::last_write_time & add io::write_zip 2025-02-25 02:03:01 +03:00
MihailRis
edb581bee3 add io::copy, io::copy_all & fix ZipFileDevice::list 2025-02-24 21:00:23 +03:00
MihailRis
9cc55e30e3 add separateFunc ZipFileDevice constructor argument 2025-02-24 20:06:55 +03:00
MihailRis
310bef1723 implement ZipFileDevice::list 2025-02-23 04:16:02 +03:00
MihailRis
58acc1b2ec implement ZipFileDevice methods (WIP) 2025-02-22 07:04:04 +03:00
MihailRis
7f4b074d70 add ZipFileDevice (WIP) 2025-02-22 05:48:48 +03:00