mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-24 09:34:24 +01:00
TIL: `rename` doesn't like its source and target to be on different partitions. This was causing the `hsmtool` tests to fail whenever we ran them on a different partition than the lightning-dir (e.g., `/dev/shm` for faster testing), because we made the backup copy in the current working directory. This changes this and creates the backup next to the original file, which has a reasonable chance to be on the same partition. Changelog-Changed: hsmtool: The `hsmtool` now creates its backup copy in the same directory as the original `hsm_secret` file.