summaryrefslogtreecommitdiffstats
path: root/src/cite.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/cite.cpp')
-rw-r--r--src/cite.cpp15
1 files changed, 12 insertions, 3 deletions
diff --git a/src/cite.cpp b/src/cite.cpp
index 018d9cf..d19dfc1 100644
--- a/src/cite.cpp
+++ b/src/cite.cpp
@@ -75,10 +75,11 @@ bool CiteDict::writeAux()
QFileInfo fi(bibFile); // open file (with .bib extension)
if (fi.exists())
{
- if (!copyFile(bibFile,m_baseFileName+"_"+bibFile))
+ if (!copyFile(bibFile,m_baseFileName+"_"+fi.fileName().data()))
{
return FALSE;
}
+ bibFile = fi.fileName().data();
if (bibFile.right(4)==".bib")
{
bibFile = bibFile.left(bibFile.length()-4);
@@ -300,9 +301,17 @@ void CiteDict::resolve()
{
QCString bibFile = bibdata;
if (!bibFile.isEmpty() && bibFile.right(4)!=".bib") bibFile+=".bib";
- if (!bibFile.isEmpty())
+ QFileInfo fi(bibFile);
+ if (fi.exists())
+ {
+ if (!bibFile.isEmpty())
+ {
+ copyFile(bibFile,latexOutputDir+fi.fileName().data());
+ }
+ }
+ else
{
- copyFile(bibFile,latexOutputDir+bibFile);
+ err("Error: bib file %s not found!\n",bibFile.data());
}
bibdata = citeDataList.next();
}