mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-08 04:02:27 +00:00
spiffs: follow symlinks feature during partition in spiffsgen
This commit is contained in:

committed by
Renz Christian Bagaporo

parent
d77a7c23da
commit
6153a0ab62
@@ -488,6 +488,11 @@ def main():
|
||||
action="store_true",
|
||||
default=True)
|
||||
|
||||
parser.add_argument("--follow-symlinks",
|
||||
help="Take into account symbolic links during partition image creation.",
|
||||
action="store_true",
|
||||
default=False)
|
||||
|
||||
parser.add_argument("--use-magic-len",
|
||||
help="Use position in memory to create different magic numbers for each block. Specify if CONFIG_SPIFFS_USE_MAGIC_LENGTH.",
|
||||
action="store_true",
|
||||
@@ -513,7 +518,7 @@ def main():
|
||||
|
||||
spiffs = SpiffsFS(image_size, spiffs_build_default)
|
||||
|
||||
for root, dirs, files in os.walk(args.base_dir):
|
||||
for root, dirs, files in os.walk(args.base_dir, followlinks=args.follow_symlinks):
|
||||
for f in files:
|
||||
full_path = os.path.join(root, f)
|
||||
spiffs.create_file("/" + os.path.relpath(full_path, args.base_dir).replace("\\", "/"), full_path)
|
||||
|
Reference in New Issue
Block a user