assistant: Fix bug that prevented adding files written by gnucash, and more generally support adding hard links to files. However, other operations on hard links are still unsupported.
This commit is contained in:
parent
46f50f5dc2
commit
579446aed4
3 changed files with 18 additions and 7 deletions
|
@ -90,15 +90,21 @@ watchDir i dir ignored hooks
|
|||
| otherwise ->
|
||||
noop
|
||||
|
||||
-- Ignore creation events for regular files, which won't be
|
||||
-- done being written when initially created, but handle for
|
||||
-- directories and symlinks.
|
||||
go (Created { isDirectory = isd, filePath = f })
|
||||
| isd = recurse $ indir f
|
||||
| hashook addSymlinkHook =
|
||||
checkfiletype Files.isSymbolicLink addSymlinkHook f
|
||||
| otherwise = noop
|
||||
-- Closing a file is assumed to mean it's done being written.
|
||||
| otherwise = do
|
||||
ms <- getstatus f
|
||||
case ms of
|
||||
Just s
|
||||
| Files.isSymbolicLink s ->
|
||||
when (hashook addSymlinkHook) $
|
||||
runhook addSymlinkHook f ms
|
||||
| Files.isRegularFile s ->
|
||||
when (hashook addHook) $
|
||||
runhook addHook f ms
|
||||
_ -> noop
|
||||
-- Closing a file is assumed to mean it's done being written,
|
||||
-- so a new add event is sent.
|
||||
go (Closed { isDirectory = False, maybeFilePath = Just f }) =
|
||||
checkfiletype Files.isRegularFile addHook f
|
||||
-- When a file or directory is moved in, scan it to add new
|
||||
|
|
3
debian/changelog
vendored
3
debian/changelog
vendored
|
@ -11,6 +11,9 @@ git-annex (4.20130622) UNRELEASED; urgency=low
|
|||
on a server are always different.
|
||||
* webapp: Fix bug setting up ssh repo if the user enters "~/" at the start
|
||||
of the path.
|
||||
* assistant: Fix bug that prevented adding files written by gnucash,
|
||||
and more generally support adding hard links to files. However,
|
||||
other operations on hard links are still unsupported.
|
||||
|
||||
-- Joey Hess <joeyh@debian.org> Fri, 21 Jun 2013 13:16:17 -0400
|
||||
|
||||
|
|
|
@ -564,3 +564,5 @@ Everything up-to-date
|
|||
|
||||
[[!tag /design/assistant]]
|
||||
[[!meta title="hard link to open file which is then deleted"]]
|
||||
|
||||
> I have fixed this bug. [[done]] --[[Joey]]
|
||||
|
|
Loading…
Add table
Reference in a new issue