Skip to content

Return epoch date in case a file mtime is 0 #32153

Open
@PVince81

Description

@PVince81

Steps

  1. Sync a file which has mtime 0 (epoch)
  2. Check oc_filecache that the mtime column contains the value "0"
  3. Do a PROPFIND on said file for "getlastmodified" properties

Expected result

Property "getlastmodified" is set to the epoch date

Actual result

Property "getlastmodified" is not defined, appears in 404 status block

Version

ownCloud 10.0.9

This is likely a side effect of PHP considering "0" as false and maybe we have some if checks that don't check the value accurately.

I suggest we fix this to make it correct as it doesn't make sense to say the property does not exist here.

The desktop client has a workaround for this: owncloud/client#6671

It is not clear how this kind of situation happens in the first place, but was still observed on our own cloud server.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions