Skip to content

Commit

Permalink
fix deletion of fsck recovered files
Browse files Browse the repository at this point in the history
The 'find' expression was looking for directories whose name ends
in ".M", however no such directories exist on the drive image, since
they are only created in /mutable/TeslaCam when creating symlinks.
Delete the actual files instead.
  • Loading branch information
marcone committed May 5, 2024
1 parent ac8f803 commit 99e4b2a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion run/archiveloop
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ function clean_cam_mount {
log "cleaning cam mount"
# Delete the files that fsck "recovered". These are generally files
# that were deleted previously by the car or teslausb
find "${CAM_MOUNT}" \( \( -type f -name FSCK\*.REC \) -o \( -type d -name \*.M \) \) -print0 | xargs -0 rm -rf
find "${CAM_MOUNT}" \( \( -type f -name FSCK\*.REC \) -o \( -type f -name "*~[0-9].MP4" \) \) -print0 | xargs -0 rm -rf

# Remove files, oldest first, until there is at least 20GB of free space

Expand Down

0 comments on commit 99e4b2a

Please sign in to comment.