Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use file move command that can work across devices #1

Merged
merged 1 commit into from May 21, 2013

Conversation

ngm
Copy link
Contributor

@ngm ngm commented May 20, 2013

I'm running Linux, and when running lad, if the location for the new project is on a different partition to the partition that /tmp is on, the File.rename command fails.

Moving project files                  XX
/var/lib/gems/1.9.1/gems/lad-0.1.2/lib/lad.rb:94:in `rename': Invalid cross-device link - (/tmp/MyNewProject, /home/foo/MyNewProject) (Errno::EXDEV)
        from /var/lib/gems/1.9.1/gems/lad-0.1.2/lib/lad.rb:94:in `block in execute'
        from /var/lib/gems/1.9.1/gems/lad-0.1.2/lib/console.rb:22:in `call'
        from /var/lib/gems/1.9.1/gems/lad-0.1.2/lib/console.rb:22:in `task'
        from /var/lib/gems/1.9.1/gems/lad-0.1.2/lib/lad.rb:93:in `execute'
        from /var/lib/gems/1.9.1/gems/lad-0.1.2/bin/lad:15:in `<top (required)>'
        from /usr/local/bin/lad:23:in `load'
        from /usr/local/bin/lad:23:in `<main>'

This is resolved if mv() is used rather than File.rename.

kouphax added a commit that referenced this pull request May 21, 2013
Use file move command that can work across devices
@kouphax kouphax merged commit d27efc4 into kouphax:master May 21, 2013
@kouphax
Copy link
Owner

kouphax commented May 21, 2013

Good spot 👍

@ngm ngm deleted the cross-device-file-moves branch May 21, 2013 17:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants