[FL-2212] File validators and archive fixes #972

Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
This commit is contained in:
Nikolay Minaylov
2022-01-29 12:39:10 +03:00
committed by GitHub
parent 84410c83b5
commit 6264ee8c3b
24 changed files with 194 additions and 52 deletions

View File

@@ -30,6 +30,14 @@ void archive_trim_file_path(char* name, bool ext) {
}
}
void archive_get_file_extension(char* name, char* ext) {
char* dot = strrchr(name, '.');
if(dot == NULL)
*ext = '\0';
else
strncpy(ext, dot, MAX_EXT_LEN);
}
void set_file_type(ArchiveFile_t* file, FileInfo* file_info) {
furi_assert(file);
furi_assert(file_info);