summaryrefslogtreecommitdiff
path: root/grc/src/gui
diff options
context:
space:
mode:
Diffstat (limited to 'grc/src/gui')
-rw-r--r--grc/src/gui/ActionHandler.py2
-rw-r--r--grc/src/gui/NotebookPage.py3
2 files changed, 3 insertions, 2 deletions
diff --git a/grc/src/gui/ActionHandler.py b/grc/src/gui/ActionHandler.py
index cc41e937c..66b652d25 100644
--- a/grc/src/gui/ActionHandler.py
+++ b/grc/src/gui/ActionHandler.py
@@ -328,7 +328,7 @@ class ActionHandler:
elif state == Actions.FLOW_GRAPH_CLOSE:
self.main_window.close_page()
elif state == Actions.FLOW_GRAPH_SAVE:
- #read-only or undefines file path, do save-as
+ #read-only or undefined file path, do save-as
if self.get_page().get_read_only() or not self.get_page().get_file_path():
self.handle_states(Actions.FLOW_GRAPH_SAVE_AS)
#otherwise try to save
diff --git a/grc/src/gui/NotebookPage.py b/grc/src/gui/NotebookPage.py
index e2e627a2d..00d811068 100644
--- a/grc/src/gui/NotebookPage.py
+++ b/grc/src/gui/NotebookPage.py
@@ -142,7 +142,8 @@ class NotebookPage(gtk.HBox):
@return true for read-only
"""
if not self.get_file_path(): return False
- return not os.access(self.get_file_path(), os.W_OK)
+ return os.path.exists(self.get_file_path()) and \
+ not os.access(self.get_file_path(), os.W_OK)
def get_file_path(self):
"""