Endless-sky not saving when save file is imported or edited

I have tried searching the code on github and have also upgraded endless-sky to the latest version. but it still will not save when the save files have been imported or edited.

see this issue for more info.

I am wondering if anyone here has any idea what is causing this