if nameControl.GetValue().find(' ') != -1:
wx.MessageBox(_("Please provide a filename that does not contains spaces."), _("Spaces in Filename"))
return False
+ if not os.path.exists(dirControl.GetValue()):
+ wx.MessageBox(_("That directory does not exist. Please choose an existing directory."), _("Provide a Valid Directory"))
+ return False
+
filePath = os.path.join(dirControl.GetValue(), MakeNameEndInExtension(nameControl.GetValue(), "." + fileExtension))
if os.path.exists(filePath):
if allowOverwriteOnPrompt:
paths.remove(path)
if paths:
projectDocument.GetCommandProcessor().Submit(ProjectEditor.ProjectAddFilesCommand(projectDocument, paths))
+ projectDocument.GetFirstView().DoSelectFiles([paths[0]])
if save:
projectDocument.OnSaveDocument(projectDocument.GetFilename())
return name[0:-1] + 'ies'
else:
return name + 's'
-
+
\ No newline at end of file