hgext/largefiles/lfutil.py
branchstable
changeset 15408 db8b0ee74025
parent 15392 d7bfbc92a1c0
child 15548 f76584098c88
--- a/hgext/largefiles/lfutil.py	Thu Nov 03 11:24:55 2011 -0500
+++ b/hgext/largefiles/lfutil.py	Thu Nov 03 10:59:32 2011 -0400
@@ -110,7 +110,9 @@
         repo.ui.note(_('Found %s in store\n') % hash)
     elif inusercache(repo.ui, hash):
         repo.ui.note(_('Found %s in system cache\n') % hash)
-        link(usercachepath(repo.ui, hash), storepath(repo, hash))
+        path = storepath(repo, hash)
+        util.makedirs(os.path.dirname(path))
+        link(usercachepath(repo.ui, hash), path)
     else:
         return None
     return storepath(repo, hash)