Specify a default directory and don't prompt when we create the plugins directory.

This commit is contained in:
James Vega 2005-04-04 05:25:59 +00:00
parent 27d835e1f6
commit d0fadee9f6

View File

@ -263,7 +263,7 @@ def main():
conf.supybot.directories.plugins.setValue(pluginDirs) conf.supybot.directories.plugins.setValue(pluginDirs)
else: else:
output("""Your bot needs to create some directories in order to store output("""Your bot needs to create some directories in order to store
the various log, config, and data files.""") the various log, config, and data files.""", default=os.curdir)
basedir = something("""Where would you like to create these basedir = something("""Where would you like to create these
directories?""") directories?""")
# conf.supybot.directories.log # conf.supybot.directories.log
@ -283,7 +283,8 @@ def main():
conf.supybot.directories.backup.setValue(backupDir) conf.supybot.directories.backup.setValue(backupDir)
# pluginDirs # pluginDirs
pluginDirs = conf.supybot.directories.plugins() pluginDirs = conf.supybot.directories.plugins()
(pluginDir, _) = getDirectoryName('plugins', basedir=basedir) (pluginDir, _) = getDirectoryName('plugins',
basedir=basedir, prompt=False)
if pluginDir not in pluginDirs: if pluginDir not in pluginDirs:
pluginDirs.append(pluginDir) pluginDirs.append(pluginDir)
conf.supybot.directories.plugins.setValue(pluginDirs) conf.supybot.directories.plugins.setValue(pluginDirs)