sqdfcqs



-- 
Vincent Legoll
Index: filediff.py
===================================================================
--- filediff.py	(revision 1347)
+++ filediff.py	(working copy)
@@ -506,6 +506,14 @@
         for i,f in enumerate(files):
             buf = self.textbuffer[i]
             if f:
+                if not os.path.exists(f):
+                    response = misc.run_dialog((_("File does not exist '%s'.") % f) +
+                                               _("Would you like to create it ?"),
+                                               parent = self,
+                                               messagetype=gtk.MESSAGE_WARNING,
+                                               buttonstype=gtk.BUTTONS_OK_CANCEL)
+                    if response == gtk.RESPONSE_OK:
+                        open(f, "w+b").close()
                 try:
                     task = misc.struct(filename = f,
                                        file = codecs.open(f, "rU", try_codecs[0]),


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]