Skip to content
This repository has been archived by the owner on Dec 1, 2023. It is now read-only.

Error when repo is not on C drive (can't copy from tmp to repo) #1

Closed
leftbigtoe opened this issue Jan 24, 2019 · 5 comments
Closed

Comments

@leftbigtoe
Copy link

I get the following error when trying to pull on any machine where the repo is not on the C: drive:

Error downloading object: 4.jpg (ea25c1b): Smudge error: Error downloading 4.jpg (ea25c1b7291fb0908c26c56c784fa35e419d91d9d1e9607981ad0198206ab51b): Failed to copy downloaded file: cannot replace "Q:\<pathBlabla>\\.git\\lfs\\objects\\ea\\25\\ea25c1b7291fb0908c26c56c784fa35e419d91d9d1e9607981ad0198206ab51b" with "C:\\Users\\DAVIDF~1\\AppData\\Local\\Temp\\lfsfolderstore176468347": rename C:\Users\DAVIDF~1\AppData\Local\Temp\lfsfolderstore176468347 Q:\<pathBlabla>\.git\lfs\objects\ea\25\ea25c1b7291fb0908c26c56c784fa35e419d91d9d1e9607981ad0198206ab51b: The system cannot move the file to a different disk drive.

is there a chance to set the temp folder to the same drive that the repo is or make this work across drives?

@leftbigtoe
Copy link
Author

seems to be related to this bug:
git-lfs/git-lfs#2137

@ZeusLT
Copy link

ZeusLT commented Jun 16, 2019

any luck fixing this?

@ZeusLT
Copy link

ZeusLT commented Jun 18, 2019

I solved by recompiling it on my own with line 78 of file "service.go" changed to:

dlFile, err := ioutil.TempFile("E:/TempFilesLFS/", "lfsfolderstore")

this requires an empty folder at that location, I chose E: drive because my repository is there (including LFS objects)

@sinbad
Copy link
Owner

sinbad commented Aug 15, 2019

Sorry for not noticing this before, something has been up with my notifications.

This is indeed an issue with git-lfs itself, lfs-folderstore just puts the contents in the temp folder (since git-lfs will attempt a move if possible since it assumes it's a download, and you don't want it to move it off your shared drive!). I remember having this issue before in git-lfs (I used to work on it) when the temp drive was different to the project drive, since regular downloads go to temp too, pretty sure it was fixed but I haven't worked on a machine with separate temp & projects drives for a long time.

Might be worth making sure you have the latest git-lfs and if so, raise a bug on the git-lfs project explaining that although you're using lfs-folderstore, it's no different to regular downloading to a temp dir. It's possible there's a specific problem in the custom transfer adapter code (it's probably less used than core).

If you get not joy I can potentially take a look although it's been a few years since I poked around in the git-lfs code.

@sinbad
Copy link
Owner

sinbad commented Aug 30, 2019

I believe I've fixed this our end now by deriving the temp dir from the repo instead of using the OS temp dir. I dug about in git-lfs and it's a simpler fix our end even though technically git-lfs should be able to handle this from a custom agent. I've released 1.0.0 with this fix.

@sinbad sinbad closed this as completed Aug 30, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants