1
mirror of https://github.com/DarkFlippers/unleashed-firmware.git synced 2025-12-13 13:09:49 +04:00

[FL-2502] Properly closing directory on free (#1174)

* Storage: better (at least working) mechanism to distinguish between files and dirs
* Storage API: debug log
* TarArchive: fix stream memleak
* TarArchive: fix another memleak
* Storage: better logs
* Storage: changed the log level to trace

Co-authored-by: あく <alleteam@gmail.com>
This commit is contained in:
SG
2022-04-28 02:16:06 +10:00
committed by GitHub
parent 7ce305fca3
commit c60562a02c
3 changed files with 33 additions and 11 deletions

View File

@@ -6,9 +6,17 @@
extern "C" {
#endif
/** File type */
typedef enum {
FileTypeClosed, /**< Closed file */
FileTypeOpenDir, /**< Open dir */
FileTypeOpenFile, /**< Open file */
} FileType;
/** Structure that hold file index and returned api errors */
struct File {
uint32_t file_id; /**< File ID for internal references */
FileType type;
FS_Error error_id; /**< Standart API error from FS_Error enum */
int32_t internal_error_id; /**< Internal API error value */
void* storage;