summaryrefslogtreecommitdiff
path: root/core/launcher/documentlist.cpp
Side-by-side diff
Diffstat (limited to 'core/launcher/documentlist.cpp') (more/less context) (show whitespace changes)
-rw-r--r--core/launcher/documentlist.cpp13
1 files changed, 12 insertions, 1 deletions
diff --git a/core/launcher/documentlist.cpp b/core/launcher/documentlist.cpp
index 44ceb0c..d8e7a83 100644
--- a/core/launcher/documentlist.cpp
+++ b/core/launcher/documentlist.cpp
@@ -456,7 +456,18 @@ void DocumentList::sendAllDocLinks()
if ( f.open( IO_ReadOnly ) ) {
QTextStream ts( &f );
ts.setEncoding( QTextStream::UnicodeUTF8 );
- contents += ts.read();
+ QString docLnk = ts.read();
+ // Strip out the (stale) LinkFile entry
+ int start = docLnk.find( "\nLinkFile = " ) + 1;
+ if ( start > 0 ) {
+ int end = docLnk.find( "\n", start + 1 ) + 1;
+ contents += docLnk.left(start);
+ contents += docLnk.mid(end);
+ } else {
+ contents += docLnk;
+ }
+ contents += "LinkFile = " + doc->linkFile() + "\n";
+
f.close();
} else
fake = TRUE;