Commit 64597f75 64597f75f0ec8a80005f65983560be92c6090b06 by Sergey Poznyakoff

(util_chdir): New function.

1 parent d0fc0da7
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 }
......