nasa / CF

The Core Flight System (cFS) CFDP application.
Apache License 2.0
76 stars 45 forks source link

Fix #373, Optionally move files when complete #375

Closed skliper closed 1 year ago

skliper commented 1 year ago

Checklist (Please check before submitting)

Describe the contribution Most trivial implementation I could think of. Just adds entry to the table, if it's filled in moves the file instead of delete, falls back to a delete if the mv fails. This moves on every TX complete for all styles... good enough for our required use-case but may not work for everyone. If the use case is to support either move or delete, you can set up two channels (one w/ the move dir defined).

Testing performed Tested use case in project code. CI (updated unit tests)

Expected behavior changes If move_dir is filled it, attempts to move instead of remove (remove is performed if move fails).

System(s) tested on Ubuntu 20.04

Additional context None

Third party code None

Contributor Info - All information REQUIRED for consideration of pull request Jacob Hageman - NASA/GSFC

skliper commented 1 year ago

Note - retains default behavior if users don't update tables (zero fill).

skliper commented 1 year ago

Added in placeholders to the table file, note if an old version is used it's zero fill so no real impact. This is more just to show the option.

skliper commented 1 year ago

Simplified empty string check, just check first char.