Guest User

Untitled

a guest
Aug 15th, 2018
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.73 KB | None | 0 0
  1. From 955d7b5079dd06153c217beba6bcd5826f84bd3f Mon Sep 17 00:00:00 2001
  2. From: Lucas Thode <lthode@mail.unomaha.edu>
  3. Date: Wed, 27 Oct 2010 16:15:37 -0500
  4. Subject: [PATCH] fixed bug in file-extension handling on export
  5.  
  6. ---
  7. eos | 2 +-
  8. gui/mainFrame.py | 10 +++++++---
  9. 2 files changed, 8 insertions(+), 4 deletions(-)
  10.  
  11. diff --git a/eos b/eos
  12. index fe29779..0412e75 160000
  13. --- a/eos
  14. +++ b/eos
  15. @@ -1 +1 @@
  16. -Subproject commit fe2977950e020ed53d122840d55248a1b0b42c5e
  17. +Subproject commit 0412e75f2567c8c450199331409edcf978ba8d9d
  18. diff --git a/gui/mainFrame.py b/gui/mainFrame.py
  19. index 64f78ac..33b5fec 100644
  20. --- a/gui/mainFrame.py
  21. +++ b/gui/mainFrame.py
  22. @@ -183,10 +183,12 @@ class MainFrame(wx.Frame):
  23. path = dlg.GetPath()
  24. if (format == 0):
  25. output = sFit.exportFit(self.getActiveFit())
  26. - path += ".cfg"
  27. + if not path.endswith(".cfg"):
  28. + path += ".cfg"
  29. elif (format == 1):
  30. output = sFit.exportXml(self.getActiveFit())
  31. - path += ".xml"
  32. + if not path.endswith(".xml"):
  33. + path += ".xml"
  34. else:
  35. print "oops, invalid fit format %d" % format
  36. dlg.Destroy()
  37. @@ -279,7 +281,9 @@ class MainFrame(wx.Frame):
  38. style = wx.FD_SAVE | wx.FD_OVERWRITE_PROMPT)
  39. if (saveDialog.ShowModal() == wx.ID_OK):
  40. filePath = saveDialog.GetPath()
  41. - sFit.backupFits(filePath)
  42. + if not filePath.endswith(".xml"):
  43. + filePath += ".xml"
  44. + sFit.backupFits(filePath )
  45. saveDialog.Destroy()
  46.  
  47. def toggleShipBrowser(self, event):
  48. --
  49. 1.7.1
Add Comment
Please, Sign In to add comment