Add some temp-name dot heuristics for OS X's sake.
authorWayne Davison <wayned@samba.org>
Tue, 5 Apr 2011 20:35:13 +0000 (13:35 -0700)
committerWayne Davison <wayned@samba.org>
Tue, 5 Apr 2011 20:35:13 +0000 (13:35 -0700)
commitb223d96bf0d040cfa445a45213fc517ab8389785
treefbc2a824a2fa4e079b10df0c22d75c058a83a04d
parent28b519c93b6db30b6520d46f8cd65160213fddd2
Add some temp-name dot heuristics for OS X's sake.

 - Drop one leading '.' from the filename (before adding our own).
 - Drop one trailing '.' from a (possibly truncated) name prior to
   the .XXXXXX suffix being added.
 - Allow the temp-name to collapse to just the .XXXXXX suffix
   if the path is long enough to require that.

Note that we don't try to remove multiple dots from a filename
that actually has multiple consecutive dots, since we might as
well learn early if the final name is going to fail or not.
receiver.c