When resource's name is empty, set file name as resource name.