If you think a bug might affect users in the 57 release, please set the correct tracking and status flags for Release Management.

Detect file format while importing (missing file extention option "all files")



8 years ago
8 years ago


(Reporter: a_geek, Unassigned)


Bug Flags:
wanted-calendar1.0 -




8 years ago
User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv: Gecko/2009122115 Firefox/3.0.17
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv: Gecko/20080917 Sunbird/0.9

When I open a calendar file (file -> open -> calendar file), I can specify "all files" in the dialogue. When I do this, the calendar file gets imported as an additional calendar. When I want to merge calendars instead, I need to "events and tasks -> import" a calendar file, at which point I'm given the choice between "ics" and "outlook csv", but not "all files". It would be nice if these dialogues could be consistent, and allow "all files" in both cases.

Reproducible: Always
The Problem there is that if we allow all files, then we can't easily detect which format the file is in.

Comment 2

8 years ago
If you can't detect the format, just display an error message to that effect, and ignore the file. If you can parse the file, there's no problem, anyway.
Well, we don't have any file detection routines. Therefore we would just be checking for the extension, which seems kind of pointless. We would have to create a file detection for each importer, which to me sounds like overkill. But I'm happy to leave this bug open to add detection to importers, but this has no priority at the moment.
Ever confirmed: true
Flags: wanted-calendar1.0-
Summary: missing file extention option "all files" → Detect file format while importing (missing file extention option "all files")

Comment 4

8 years ago
Let me see if I understand you correctly: In comment#1 you write that you use the extension to determine the file type. In comment#3 you write that you don't detect the file type, and that checking the extension is pointless (I agree on the latter). Right?

I understand that you don't want to write real parsers right now, although you must have done so to facilitate the import in the first place, but argue that it would be good to have at least one of "no extension checking" and allowing all file names, or augmenting the list of allowed extensions to cover all common cases.
You need to log in before you can comment on or make changes to this bug.