This line in system.install:

        'description' => 'A flag indicating whether file is temporary (1) or permanent (0).',

I've peered at my files table and I'm pretty sure the 0 ones are the temporary ones -- so that line of comment has it the wrong way round.
(Also, when you add a status field in views, it tells you the 0 means temporary.)

CommentFileSizeAuthor
#12 437822-fixd6.patch738 bytesjhodgdon
#2 437822.patch992 bytesjhodgdon

Comments

jhodgdon’s picture

Version: 6.x-dev » 7.x-dev

I think joachim is correct. It is also incorrect in Drupal 7.

See:
- http://api.drupal.org/api/function/system_schema/7 (table "files", field "status"), where it says "'A bitmapped field indicating the status of the file the least sigifigant bit indicates temporary (1) or permanent (0). Temporary files older than DRUPAL_MAXIMUM_TEMP_FILE_AGE will be removed during a cron run.
- http://api.drupal.org/api/function/system_cron/7 where it removes files with status bit not equal to FILE_STATUS_PERMANENT
- http://api.drupal.org/api/constant/FILE_STATUS_PERMANENT/7 (defined to be 1).

Significant is also misspelled in the D7 doc.

jhodgdon’s picture

Status: Active » Needs review
StatusFileSize
new992 bytes

Here's a D7 patch.

Would we patch D6 for this? I wasn't sure if it would fall under string freeze. Anyway, D7 first...

Status: Needs review » Needs work

The last submitted patch failed testing.

jhodgdon’s picture

Status: Needs work » Needs review

Setting back to Needs Review in hopes that the patch will get retested. The test bot was apparently malfunctioning (I had about 7 patches fail in that time period, all were doc, none broke the HEAD install I am pretty sure).

Status: Needs review » Needs work

The last submitted patch failed testing.

jhodgdon’s picture

Status: Needs work » Needs review

Test bot problem

dries’s picture

Status: Needs review » Fixed

Committed to CVS HEAD. Thanks!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

xjm’s picture

jhodgdon’s picture

Version: 7.x-dev » 6.x-dev
Status: Closed (fixed) » Patch (to be ported)

Oh. We should reopen this issue and port to D6.

joachim’s picture

Status: Patch (to be ported) » Needs review

I'm guessing that patch will work on D6.

Will setting to needs review make the bot try it on 6?

jhodgdon’s picture

StatusFileSize
new738 bytes

The test bot won't go back and test past patches unless you hit "retest".

Anyway, the patch doesn't apply in D6...

How about this?

joachim’s picture

Status: Needs review » Reviewed & tested by the community

I think we can RTBC that without bot approval :)

gábor hojtsy’s picture

Status: Reviewed & tested by the community » Fixed

Committed, thanks.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.