Issue Bug Closed

#44585FAL: file properties are not updated

Stefan Froemken 01/16/13, 23:29 updated 10/02/18, 12:15

Description

Hello Core-Team,

I have my own FAL-Extension: fal_dropbox: https://github.com/froemken/fal_dropbox/
I create (NOT upload!) a new empty file called: hallo.txt
The new file will be created and listed perfectly. The size of this file is 0 bytes. This information is also added to sys_file.
Now I edit this file and write something in there and save this file.
The file was saved successfully and we return to our filelist.

BUT: The filesize keeps being 0 bytes.

After a long time of debugging I found out following:

In File.php -> Method: mergeIndexRecord() you have:

$this->properties = array_merge($this->properties, $recordData);

In $this->properties we have the correct values (bytes = 141)
In $recordData we have the old values from database.
After merging, the correct values are overwritten with the old values from the database.

Changing the values soved the problem:

$this->properties = array_merge($recordData, $this->properties);

Stefan

Reviews 2