karan / joe

:running: A .gitignore magician in your command line
http://karan.github.io/joe/
MIT License
2.88k stars 210 forks source link

Error when running joe u #74

Closed arthru closed 8 years ago

arthru commented 8 years ago

With latest 1.0.0, when running joe u, I get the following error :

$ joe u
Updating gitignore files..
2016/04/04 09:54:01 rename /tmp/gitignore-master /home/arthur/.joe-data: invalid cross-device link

I guess that joe is trying to make a hard link from my home to my tmp dir. That won't work as this two dirs are not on the same partition...

I suggest making a real copy instead.

arthru commented 8 years ago

After a quick look, I think the line to fix is https://github.com/karan/joe/blob/master/utils.go#L83

arthru commented 8 years ago

But it is kinda strange that the renmae fonction from go does not work between two different partitions...

karan commented 8 years ago

Yeah my assumption was that Rename works across partitions since it's considered "safe". But I guess not. If you have the time to change it to actual copy, please do send a PR. Or I'll fix it when I get the time.