Feature Request: When saving snapshots outside target_dir, don't recreate the symlink lastsnap.jpg with every snapshot
I'm saving my snapshot image outside target_dir to avoid unneccessary writes on flash-backed filesystem which is under target_dir (my target_dir is /src/cam/data and snapshot_filename is ../mem/img). Motion seems to handle this situation prety well, as it even creates symlink /srv/cam/data/lastnap.jpg -> ../mem/img.jpg, which is very useful as it enables me to see both motion videos and last snapshot in target_dir.
It also seems to recreate the symling /srv/cam/data/lastsnap.jpg with every saved snapshots, which is useful (cleanup can be done by deleting everything under target_dir without having to worry about that symlink), but it probably generates some disk writes (as ctime/mtime changes with every snapshot) which are undesirable on flash media. Therefore I think it would be very useful to add new config option which would tell motion not to create this symlink if it already exists.
If this makes sense and seems acceptable, I think I could also write a patch to implement this feature.
- 31 Jan 2012