(util_chdir): New function.
Showing
1 changed file
with
9 additions
and
1 deletions
1 | /* GNU Mailutils -- a suite of utilities for electronic mail | 1 | /* GNU Mailutils -- a suite of utilities for electronic mail |
2 | Copyright (C) 1999, 2001, 2002, 2003, 2004, | 2 | Copyright (C) 1999, 2001, 2002, 2003, 2004, |
3 | 2005 Free Software Foundation, Inc. | 3 | 2005, 2006 Free Software Foundation, Inc. |
4 | 4 | ||
5 | GNU Mailutils is free software; you can redistribute it and/or modify | 5 | GNU Mailutils is free software; you can redistribute it and/or modify |
6 | it under the terms of the GNU General Public License as published by | 6 | it under the terms of the GNU General Public License as published by |
... | @@ -1290,3 +1290,11 @@ util_run_events (int old_state, int new_state) | ... | @@ -1290,3 +1290,11 @@ util_run_events (int old_state, int new_state) |
1290 | } | 1290 | } |
1291 | } | 1291 | } |
1292 | 1292 | ||
1293 | void | ||
1294 | util_chdir (const char *homedir) | ||
1295 | { | ||
1296 | int rc = chdir (homedir); | ||
1297 | if (rc) | ||
1298 | mu_error ("Cannot change to home directory `%s': %s", | ||
1299 | homedir, mu_strerror (errno)); | ||
1300 | } | ... | ... |
-
Please register or sign in to post a comment