0.11-stable: Only increment the file number if the current file already exists. This ensures e.g. permission or disk full errors are reported correctly.
Part of #3722.
Authored by: rblank 2009-01-30
Parent: [r7809]
Child: [r7811]