}
// a directory may be passed here so we need to test it. (bug 3622)
if (isDirectory()) {
}
// a directory may be passed here so we need to test it. (bug 3622)
if (isDirectory()) {
- LYXERR0('\\' << absFilename() << "\" is a directory!");
+ LYXERR0('"' << absFilename() << "\" is a directory!");
return 0;
}
LYXERR0("Checksumming \"" << absFilename() << "\".");
return 0;
}
LYXERR0("Checksumming \"" << absFilename() << "\".");
{
bool const success = QFile::remove(d->fi.absoluteFilePath());
if (!success && exists())
{
bool const success = QFile::remove(d->fi.absoluteFilePath());
if (!success && exists())
- lyxerr << "FileName::removeFile(): Could not delete file "
- << *this << "." << endl;
+ LYXERR0("Could not delete file " << *this);
{
QDir dir(fi.absoluteFilePath());
QFileInfoList list = dir.entryInfoList();
{
QDir dir(fi.absoluteFilePath());
QFileInfoList list = dir.entryInfoList();
- bool global_success = true;
for (int i = 0; i != list.size(); ++i) {
if (list.at(i).fileName() == ".")
continue;
if (list.at(i).fileName() == "..")
continue;
for (int i = 0; i != list.size(); ++i) {
if (list.at(i).fileName() == ".")
continue;
if (list.at(i).fileName() == "..")
continue;
if (list.at(i).isDir()) {
if (list.at(i).isDir()) {
- LYXERR(Debug::FILES, "Erasing dir "
+ LYXERR(Debug::FILES, "Removing dir "
<< fromqstr(list.at(i).absoluteFilePath()));
<< fromqstr(list.at(i).absoluteFilePath()));
- success = rmdir(list.at(i));
+ removed = rmdir(list.at(i));
- LYXERR(Debug::FILES, "Erasing file "
+ LYXERR(Debug::FILES, "Removing file "
<< fromqstr(list.at(i).absoluteFilePath()));
<< fromqstr(list.at(i).absoluteFilePath()));
- success = dir.remove(list.at(i).fileName());
+ removed = dir.remove(list.at(i).fileName());
- if (!success) {
- global_success = false;
- lyxerr << "Could not delete "
- << fromqstr(list.at(i).absoluteFilePath()) << "." << endl;
+ if (!removed) {
+ success = false;
+ LYXERR0("Could not delete "
+ << fromqstr(list.at(i).absoluteFilePath()));
}
}
QDir parent = fi.absolutePath();
}
}
QDir parent = fi.absolutePath();
- global_success |= parent.rmdir(fi.fileName());
- return global_success;
+ success &= parent.rmdir(fi.fileName());
+ return success;
{
bool const success = rmdir(d->fi);
if (!success)
{
bool const success = rmdir(d->fi);
if (!success)
- lyxerr << "Could not delete " << *this << "." << endl;
+ LYXERR0("Could not delete " << *this);
docstring FileName::fileContents(string const & encoding) const
{
if (!isReadableFile()) {
docstring FileName::fileContents(string const & encoding) const
{
if (!isReadableFile()) {
- LYXERR0("File '" << *this
- << "' is not redable!");
+ LYXERR0("File '" << *this << "' is not redable!");
// GZIP \037\213 http://www.ietf.org/rfc/rfc1952.txt
// ZIP PK... http://www.halyava.ru/document/ind_arch.htm
// Z \037\235 UNIX compress
// GZIP \037\213 http://www.ietf.org/rfc/rfc1952.txt
// ZIP PK... http://www.halyava.ru/document/ind_arch.htm
// Z \037\235 UNIX compress
if (empty() || !isReadableFile())
return string();
if (empty() || !isReadableFile())
return string();