On Mon, May 23, 2005 at 03:28:37PM +0200, Peter Stuge wrote:
> path is initialized in session-initialize-bincimapd.cc by this code:
>
> string path = session.globalconfig["Mailbox"]["path"];
> if (session.args.getUnqualifiedArgs().size() > 0)
> path = session.args.getUnqualifiedArgs()[0];
> if (path == "") path = ".";
> else if (chdir(path.c_str()) != 0) {
> mkdir(path.c_str(), 0777);
> if (chdir(path.c_str()) != 0) {
> logger << "when entering depot " + toImapString(path) + ": "
> << strerror(errno) << endl;
> return false;
> }
> }
..looking closer at this code the logic seems a bit sketchy, or am I
just confused?
path is set
if path is blank, set to "."
otherwise chdir() to path
..and later in the session path is used as a prefix too, which
confuses me.. Will that really work for any case when path!="." ?
//Peter