MantisBT: master-1.2.x f6b8f7e9

Author Committer Branch Timestamp Parent
dregad dregad master-1.2.x 2013-03-06 00:50 master-1.2.x 67bbf86b
Affected Issues  0015572: diskfile_is_name_unique() can return non-unique filename
Changeset

Revise and improve diskfile_is_name_unique()

Prior to this, the API would only check for a file's uniqueness by
looking up the bug_file table, and did not actually checking the file
system for an existing file.

This causes 2 potential issues:

  • we could have a duplicate in the file system and therefore unwittingly
    overwrite it with a new file
  • it was not possible to use the function for for project docs

Fixes 0015572

mod - core/file_api.php Diff File