Remove hack inserted by me long time ago (cd $HOME for user-called case),
no other system do it and it can cause problem with multi-calendars for single user.
This commit is contained in:
parent
ab91e8eff2
commit
2b91a983a5
@ -42,7 +42,7 @@
|
||||
.Op Fl a
|
||||
.Sh DESCRIPTION
|
||||
.Nm Calendar
|
||||
checks the $HOME directory for a file named
|
||||
checks the current directory for a file named
|
||||
.Pa calendar
|
||||
and displays lines that begin with either today's date
|
||||
or tomorrow's.
|
||||
|
@ -80,7 +80,6 @@ main(argc, argv)
|
||||
{
|
||||
extern int optind;
|
||||
int ch;
|
||||
char *s;
|
||||
|
||||
while ((ch = getopt(argc, argv, "-a")) != EOF)
|
||||
switch (ch) {
|
||||
@ -111,11 +110,8 @@ main(argc, argv)
|
||||
cal();
|
||||
(void)seteuid(0);
|
||||
}
|
||||
else {
|
||||
if ((s = getenv("HOME")) != NULL)
|
||||
chdir(s);
|
||||
else
|
||||
cal();
|
||||
}
|
||||
exit(0);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user