Eeschema: schematic files might be saved having a wrong file extension

Bug #1122212 reported by Antia Puentes
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
KiCad
Fix Released
Undecided
Antia Puentes

Bug Description

It is possible to save a file in schematic having a wrong file extension or not file extension at all.

Steps to reproduce:
1. Open schematic
2. Menu: File -> Save current sheet as
3. Type a filename having an extension different to '.sch' or not extension at all.

Output:
The file is saved but it is not possible to open it anymore because the Eeschema Open dialog filters the files by the '.sch' extension.

Revision history for this message
Antia Puentes (apuentes) wrote :
Revision history for this message
Antia Puentes (apuentes) wrote :

The patch adds the appropriate file extension before saving if the file has an incorrect extension or not extension at all.
It also refactors the SCH_EDIT_FRAME::SaveEEFile function.

Once the correct extension is added, if a file with the same filename already exists it creates the .bak file before saving the new file. This was needed because the dialog class used, wxFileDialog, doesn't check that the file has the correct extension, although you set the wildcard.

Antia Puentes (apuentes)
Changed in kicad:
assignee: nobody → Antia Puentes (apuentes)
Antia Puentes (apuentes)
Changed in kicad:
status: New → Fix Committed
Revision history for this message
Martin Errenst (imp-d) wrote :

r3946 stable

Changed in kicad:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.