Priority: Urgent
Current State: Closed
Released In: 1.1.0
Target Release: minor
Applies To: Engine
Component:
Branches:
I would have been expecting it to be false, unless the attachment is actually there on the disk.
--
AndrewJones - 19 Jul 2010
$meta->testAttachment("testfile.txt", 'e')
does do what I expected. I guess we need to check how Foswiki::Func::attachmentExists worked in 1.0
--
AndrewJones - 19 Jul 2010
As far as Foswiki is concerned, the "existence" of an attachment is dictated by the presence (or otherwise) of meta. If someone comes along and corrupts the database by deleting a file, then there might need to be an update of some kind c.f. autoattachpubfiles. But otherwise, the meta-data is the font of knowledge.
I would be bothered if the meta says the attachment exists, but the other methods then refuse to work with it because there is no file on disk, however.
--
CrawfordCurrie - 19 Jul 2010
The issue I have is the change in behaviour, and whether its important.
I have checked in unit tests to 01x00 and trunk. On 01x00,
test_attachmentExistsInMetaOnly
passes. It fails on trunk.
I am not sure if the behaviour for this function needs to stay the same. If it doesn't matter then we can just change the unit test.
--
AndrewJones - 19 Jul 2010
Well, from a compatibility perspective, it has to remain the same. From a
logical perspective, it means that attachments might be incorrectly removed from a topic because they don't exist in store, which can be confusing. I have changed the behaviour back to require a store presence; but we're going to have to watch it
carefully in case something else is (re)broken.
--
CrawfordCurrie - 20 Jul 2010
Removed the test as well
--
CrawfordCurrie - 23 Jul 2010