Marking as a duplicate of bug 338640 because both are caused by OOo doing this (pseudocode):
$basename = "foo"
$extension = "bar"
if ($basename exists) error!
else
$filename = $basename.$extension
save
The $filename = $basename.$extension should happen before the if statement
Marking as a duplicate of bug 338640 because both are caused by OOo doing this (pseudocode): $extension
$basename = "foo"
$extension = "bar"
if ($basename exists) error!
else
$filename = $basename.
save
The $filename = $basename. $extension should happen before the if statement