add: Avoid a failure mode that resulted in the file seemingly being deleted (content put in the annex but no symlink present).
This commit is contained in:
parent
ff531b9677
commit
67dcc1f171
3 changed files with 8 additions and 2 deletions
|
@ -51,11 +51,11 @@ perform (file, backend) = do
|
||||||
|
|
||||||
cleanup :: FilePath -> Key -> CommandCleanup
|
cleanup :: FilePath -> Key -> CommandCleanup
|
||||||
cleanup file key = do
|
cleanup file key = do
|
||||||
logStatus key InfoPresent
|
|
||||||
|
|
||||||
link <- calcGitLink file key
|
link <- calcGitLink file key
|
||||||
liftIO $ createSymbolicLink link file
|
liftIO $ createSymbolicLink link file
|
||||||
|
|
||||||
|
logStatus key InfoPresent
|
||||||
|
|
||||||
-- touch the symlink to have the same mtime as the file it points to
|
-- touch the symlink to have the same mtime as the file it points to
|
||||||
s <- liftIO $ getFileStatus file
|
s <- liftIO $ getFileStatus file
|
||||||
let mtime = modificationTime s
|
let mtime = modificationTime s
|
||||||
|
|
2
debian/changelog
vendored
2
debian/changelog
vendored
|
@ -4,6 +4,8 @@ git-annex (3.20110706) UNRELEASED; urgency=low
|
||||||
* Bugfix: Forgot to de-escape keys when upgrading. Could result in
|
* Bugfix: Forgot to de-escape keys when upgrading. Could result in
|
||||||
bad location log data for keys that contain [&:%] in their names.
|
bad location log data for keys that contain [&:%] in their names.
|
||||||
(A workaround for this problem is to run git annex fsck.)
|
(A workaround for this problem is to run git annex fsck.)
|
||||||
|
* add: Avoid a failure mode that resulted in the file seemingly being
|
||||||
|
deleted (content put in the annex but no symlink present).
|
||||||
|
|
||||||
-- Joey Hess <joeyh@debian.org> Tue, 05 Jul 2011 20:52:11 -0400
|
-- Joey Hess <joeyh@debian.org> Tue, 05 Jul 2011 20:52:11 -0400
|
||||||
|
|
||||||
|
|
|
@ -8,3 +8,7 @@ Recently I ran into the following situation under Ubuntu with an encrypted home
|
||||||
The file seems to be completely gone. It no longer exists in the current directory, or under .git/annex.
|
The file seems to be completely gone. It no longer exists in the current directory, or under .git/annex.
|
||||||
|
|
||||||
I don't mind horribly that git-annex failed due to the name length limit, but it shouldn't have deleted my file in the process (fortunately the file wasn't very important, or hard to recover).
|
I don't mind horribly that git-annex failed due to the name length limit, but it shouldn't have deleted my file in the process (fortunately the file wasn't very important, or hard to recover).
|
||||||
|
|
||||||
|
> [[done]], as noted it did not delete content and now it makes the symlink
|
||||||
|
> before trying to write to the location log, avoiding that gotcha.
|
||||||
|
> --[[Joey]]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue