The reason we'd crash is that we tried to pre-create a file called $target.redo.tmp, which wouldn't work because the directory containing $target didn't exist. We now try to generate a smarter filename by using the innermost directory of target that *does* exist. It's a little messy, but the idea is to make sure we won't have to rename() across a filesystem boundary if, for example, there's a mounted filesystem in the middle of the hierarchy somewhere. |
||
|---|---|---|
| .. | ||
| do | ||