davidmarkclements / 0x

🔥 single-command flamegraph profiling 🔥
MIT License
3.21k stars 103 forks source link

Fix: EXDEV: cross-device link not permitted #260

Closed Minhir closed 2 years ago

Minhir commented 2 years ago

It's impossible to use 0x with volumes mounted on different file systems.

Error: 
EXDEV: cross-device link not permitted, rename '/dir1/isolate-0x2f2a329ae330-418-418-v8.log' -> '/dir2/isolate-0x2f2a329ae330-418-418-v8.log'

The reason of such behavior is fs.rename. So I added fs-extra and use move instead.

P.S. Also, there was infinity loop in renameSafe. This is because of i++ :see_no_evil:

Probably fix https://github.com/davidmarkclements/0x/issues/241