Open Bug 1435564 Opened 6 years ago Updated 2 years ago

File blob for MacOS package zero length

Categories

(Core :: DOM: File, defect, P2)

58 Branch
defect

Tracking

()

UNCONFIRMED

People

(Reporter: alex, Unassigned)

Details

(Whiteboard: DWS_NEXT)

Attachments

(1 file)

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.119 Safari/537.36

Steps to reproduce:

1. Download attached "zip" file, extract to a directory (so you have the .ynab4 file to test uploading)
1. Go to https://codepen.io/anon/pen/MQyKzd
2. Upload attached .ynab4 file (a mac os "package") on MacOS
3. Open developer console to inspect output


Actual results:

In console, the file has a length of zero. See file blob details below:

lastModified: 1517697023732
lastModifiedDate: Date 2018-02-03T22:30:23.732Z
name: "Test Budget~4607A89C.ynab4"
size: 0
type: ""
webkitRelativePath: ""


Expected results:

On Chrome and Safari on MacOS, the file is properly uploaded with a nonzero file length. Of note, the file is uploaded with a ".zip" appended.

See the Chrome and Safari file blob details below:

lastModified: 1517697023000
name: "Test Budget~4607A89C.ynab4.zip"
size: 16528
type: "application/zip"
Priority: -- → P2
What happens here is that macOS sees the content of the zip as a single file but, actually, it's a directory.
A directory doesn't have a size (this is not completely true on a posix system...) and it doesn't have a content.
Wondering if zipping the content of a directory is the right approach. Definitely it's not what the spec says to do.

Marion, can you find somebody with a mac to check if macosx returns a particular error code when the user tries to open a file, which is, in reality, a directory? I don't think I can work on this issue, because I don't have the right hardware, at the moment.
Flags: needinfo?(mdaly)
Jan, you have a mac, could you give this a look?
Flags: needinfo?(mdaly) → needinfo?(jvarga)
removing NI and adding to backlog.
Flags: needinfo?(jvarga)
Whiteboard: DWS_NEXT
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: