When import prune data to mounted path got error invalid cross-device link
The error EXDEV (18): invalid cross-device link occurs because os.Rename cannot move files or directories across different file systems (e.g., from one mounted drive to another). os.Rename works only when the source and destination are on the same filesystem.
What Happened
✔ snapshot 2024-11-01 (157.70 MB)
0% [ ] data.zip (0.00 Bytes/157.70 MB) 2024/11/01 11:02:57 download completed
Extracting files...
Moving data...
failed to move directory from /tmp/pactus689140844/data to /home/javad/Work/Pactus/data/testnet/data: rename /tmp/pactus689140844/data /home/javad/Work/Pactus/data/testnet/data: invalid cross-device link
Description
When import prune data to mounted path got error
invalid cross-device link
The error EXDEV (18): invalid cross-device link occurs because os.Rename cannot move files or directories across different file systems (e.g., from one mounted drive to another). os.Rename works only when the source and destination are on the same filesystem.
What Happened
Error happen in:
https://github.com/pactus-project/pactus/blob/9ddfd957b038220888fa9213286f5df9a85bda49/util/io.go#L217-L219