Merge pull request #2650 from ANTodorov/fix_spiffs_tree_linkname

fixed symlink name in mem spiffs tree
This commit is contained in:
Iceman 2024-11-21 18:49:04 +01:00 committed by GitHub
commit 4b141ca2c4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 7 additions and 3 deletions

View file

@ -3,7 +3,8 @@ All notable changes to this project will be documented in this file.
This project uses the changelog in accordance with [keepchangelog](http://keepachangelog.com/). Please use this to write notable changes, which is not the same as git commit log...
## [unreleased][unreleased]
- fix reported file/link names when `mem spiffs wipe` (ANTodorov)
- Fixed symlink name in `mem spiffs tree` (@ANTodorov)
- Fixed reported file/link names when `mem spiffs wipe` (ANTodorov)
- Updated atrs list (@iceman1001)
- Added support for a new KDF (@iceman1001)
- Added Inner range aid and mad entries (@iceman1001)

View file

@ -651,8 +651,11 @@ void rdv40_spiffs_safe_print_tree(void) {
read_from_spiffs((char *)pe->name, (uint8_t *)linkdest, SPIFFS_OBJ_NAME_LEN);
sprintf(resolvedlink, "(.lnk) --> %s", linkdest);
// Kind of stripping the .lnk extension
strtok((char *)pe->name, ".");
char *linkname = (char *)pe->name;
int len = strlen(linkname);
if (len >= 4 && strcmp(&linkname[len - 4], ".lnk") == 0) {
linkname[len - 4] = '\0';
}
}
Dbprintf("[%04x] " _YELLOW_("%5i") " B |-- %s%s", pe->obj_id, pe->size, pe->name, resolvedlink);