1. Create new note,
2. Add two files from two different directories with this same name,
Result: There are two entries with this same name but points to this same file.
You right, attachments are currently addressed with ID of parent file and file name. It seems we should automatically rename the file which is being attached in case when there is already a file with same name attached, like:
fixed in 24.0