Updates the set command to disallow configlocation and updates associated man apge entry

This commit is contained in:
Brian Evans 2019-11-18 15:44:32 -08:00
parent c9c87f4129
commit 26c4b176c0
2 changed files with 9 additions and 1 deletions

View File

@ -206,6 +206,10 @@ Writes data from a given link id in the current document to a file. The file is
The following is a list of the settings that \fBbombadillo\fP recognizes, as well as a description of their valid values.
.TP
.B
configlocation
The path to the directory that the \fI.bombadillo.ini\fP configuration file is stored in. This is a \fBread only\fP setting and cannot be changed with the \fIset\fP command, but it can be read with the \fIcheck\fP command.
.TP
.B
homeurl
The url that \fBbombadillo\fP navigates to when the program loads or when the \fIhome\fP or \fIh\fP LINE COMMAND is issued. This should be a valid url. If a scheme/protocol is not included, gopher will be assumed.
.TP

View File

@ -410,7 +410,11 @@ func (c *client) doCommandAs(action string, values []string) {
c.Options[values[0]] = lowerCaseOpt(values[0], val)
if values[0] == "tlskey" || values[0] == "tlscertificate" {
c.Certs.LoadCertificate(c.Options["tlscertificate"], c.Options["tlskey"])
}
} else if values[0] == "configlocation" {
c.SetMessage("Cannot set READ ONLY setting 'configlocation'", true)
c.DrawMessage()
return
}
err := saveConfig()
if err != nil {
c.SetMessage("Value set, but error saving config to file", true)