mob-sakai / GitDependencyResolverForUnity

This plugin resolves git url dependencies in the package for Unity Package Manager. You can use a git url as a package dependency!
MIT License
248 stars 33 forks source link

Fix: IOException when temp package files are on different device/partition than Unity project #27

Closed sticmac closed 3 years ago

sticmac commented 3 years ago

name: Pull Request about: Create a pull request title: 'Fix: IOException when temp package files are on different device/partition than Unity project' assignees: mob-sakai


This pull request aims to fix a bug I encountered while trying to use this package in a Unity project which was on a different partition than my temporary files folder. Since an imported package seems to be copied to the temporary files' folder before being brought back to the actual Unity project's folder, and that I'm on Linux with my /tmp folder in a different partition than the rest of my file system, I stumbled upon this error:

System.IO.IOException: Source and destination are not on the same device

The problem was coming from the package's attempts to move the package from the temporary files' folder to the Unity projects, which is not allowed from one partition to another. As such, changing this behavior to simply copy the package and then delete it from temp folder fixes the problem.

sticmac commented 3 years ago

It seems like the CI doesn't work? (failing at activating Unity Editor)

mob-sakai commented 3 years ago

@sticmac Thanks a lot!

github-actions[bot] commented 3 years ago

:tada: This PR is included in version 2.0.0-preview.2 :tada:

The release is available on:

Your semantic-release bot :package::rocket: