tiffany352 / rink-rs

Unit conversion tool and library written in rust
https://rinkcalc.app/about
GNU General Public License v3.0
442 stars 28 forks source link

Invalid cross-device link error #92

Closed RX14 closed 3 years ago

RX14 commented 3 years ago

When starting rink, I get an error, but the rest of the application seems to work:

   0: Failed to load currency data
   1: Failed to fetch currency.json
   2: Failed to write to cache dir
   3: failed to persist temporary file: Invalid cross-device link (os error 18)
   4: Invalid cross-device link (os error 18)

from strace I can see that the application is trying to use the rename syscall to rename a file in /tmp to somewhere in /home.

rename("/tmp/.tmplOVg69", "/home/rx14/.cache/rink/currency.json") = -1 EXDEV (Invalid cross-device link)

Thanks for rink! I use it happily every day :)

tiffany352 commented 3 years ago

I'll try to put out a new release soon with a fix for this. For my future self, the problem seems to be:

https://github.com/tiffany352/rink-rs/blob/af49f5d8b1a809d9a7d6c059acedc020a1588e9e/src/config.rs#L320

needs to be replaced with a call to new_in.

deviant commented 3 years ago

I've been running into this as well, thanks for the fix!