wrong semantic for read-only when started from command line

Bug #1853421 reported by M. Scholz
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
KiCad
Fix Committed
Undecided
M. Scholz

Bug Description

Hello.

Kicad uses wxFileName.IsDirWritable in KICAD_MANAGER_FRAME::LoadProject to determine whether a project is read-only. This does not work properly when you start it in the command line from the directory the .pro file is located in. I was genuinely surprised and didn't understand why my project was read only when this occurred.

./test test
GetName() test
GetFullPath() test
Exists() 1
IsAbsolute() 0
IsDirWritable() 0

./test ./test
GetName() test
GetFullPath() ./test
Exists() 1
IsAbsolute() 0
IsDirWritable() 1

A possible fix is appended.

Revision history for this message
M. Scholz (srtlg) wrote :
Revision history for this message
KiCad Janitor (kicad-janitor) wrote :

Fixed in revision dbb9b5f64fd65d2756cb91a2bfb32270c201a6d4
https://git.launchpad.net/kicad/patch/?id=dbb9b5f64fd65d2756cb91a2bfb32270c201a6d4

Changed in kicad:
status: New → Fix Committed
assignee: nobody → M. Scholz (srtlg)
Revision history for this message
Seth Hillbrand (sethh) wrote :

This looks good. Thank you for your contribution.

I corrected the code formatting and added your information to the patch.

In future patches, you can use `git format-patch HEAD~` to get the commit in an easily usable format for merging.

Changed in kicad:
milestone: none → 5.1.6
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Patches

Remote bug watches

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