- if (strcmp(m_mailpath(folder), pwd()) == 0)
- adios(NULL, "sorry, you can't remove the current working directory");
+ if (strcmp(toabsdir(folder), pwd()) == 0)
+ adios(NULL, "You can't remove the current working directory");
- for (cp = copy(folder, newfolder);
- cp > newfolder && *cp != '/'; cp--)
- continue;
+ strcpy(newfolder, folder);
+ cp = newfolder + strlen(newfolder);
+ while (cp > newfolder && *cp != '/')
+ cp--;
if (cfolder && strcmp(cfolder, newfolder)) {
printf("[+%s now current]\n", newfolder);
/* update current folder */
if (cfolder && strcmp(cfolder, newfolder)) {
printf("[+%s now current]\n", newfolder);
/* update current folder */
case OK:
if (access(".", W_OK) != NOTOK &&
access("..", W_OK) != NOTOK)
case OK:
if (access(".", W_OK) != NOTOK &&
access("..", W_OK) != NOTOK)
case NOTOK:
snprintf(cur, sizeof(cur), "atr-%s-%s",
case NOTOK:
snprintf(cur, sizeof(cur), "atr-%s-%s",