|
a/src/common/rclconfig.cpp |
|
b/src/common/rclconfig.cpp |
1 |
#ifndef lint
|
1 |
#ifndef lint
|
2 |
static char rcsid[] = "@(#$Id: rclconfig.cpp,v 1.27 2006-04-03 11:43:07 dockes Exp $ (C) 2004 J.F.Dockes";
|
2 |
static char rcsid[] = "@(#$Id: rclconfig.cpp,v 1.28 2006-04-20 09:20:09 dockes Exp $ (C) 2004 J.F.Dockes";
|
3 |
#endif
|
3 |
#endif
|
4 |
/*
|
4 |
/*
|
5 |
* This program is free software; you can redistribute it and/or modify
|
5 |
* This program 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
|
7 |
* the Free Software Foundation; either version 2 of the License, or
|
7 |
* the Free Software Foundation; either version 2 of the License, or
|
|
... |
|
... |
356 |
// Explanatory text
|
356 |
// Explanatory text
|
357 |
char blurb[sizeof(blurb0)+1025];
|
357 |
char blurb[sizeof(blurb0)+1025];
|
358 |
string exdir = path_cat(m_datadir, "examples");
|
358 |
string exdir = path_cat(m_datadir, "examples");
|
359 |
sprintf(blurb, blurb0, exdir.c_str());
|
359 |
sprintf(blurb, blurb0, exdir.c_str());
|
360 |
|
360 |
|
|
|
361 |
// Use protective 700 mode to create the top configuration
|
|
|
362 |
// directory: documents can be reconstructed from index data.
|
361 |
if (access(m_confdir.c_str(), 0) < 0 &&
|
363 |
if (access(m_confdir.c_str(), 0) < 0 &&
|
362 |
mkdir(m_confdir.c_str(), 0755) < 0) {
|
364 |
mkdir(m_confdir.c_str(), 0700) < 0) {
|
363 |
m_reason += string("mkdir(") + m_confdir + ") failed: " +
|
365 |
m_reason += string("mkdir(") + m_confdir + ") failed: " +
|
364 |
strerror(errno);
|
366 |
strerror(errno);
|
365 |
return false;
|
367 |
return false;
|
366 |
}
|
368 |
}
|
367 |
for (int i = 0; i < ncffiles; i++) {
|
369 |
for (int i = 0; i < ncffiles; i++) {
|