Fix more updater derps.
* Updater requires unix style paths on input. * No update notification was getting cloned with every check
This commit is contained in:
		@@ -438,9 +438,6 @@ bool DownloadUpdateTask::writeInstallScript(UpdateOperationList &opsList, QStrin
 | 
			
		||||
	{
 | 
			
		||||
		QDomElement file = doc.createElement("file");
 | 
			
		||||
 | 
			
		||||
		QString native_file = QDir::toNativeSeparators(op.file);
 | 
			
		||||
		QString native_dest = QDir::toNativeSeparators(op.dest);
 | 
			
		||||
 | 
			
		||||
		switch (op.type)
 | 
			
		||||
		{
 | 
			
		||||
		case UpdateOperation::OP_COPY:
 | 
			
		||||
@@ -449,8 +446,8 @@ bool DownloadUpdateTask::writeInstallScript(UpdateOperationList &opsList, QStrin
 | 
			
		||||
			QDomElement name = doc.createElement("source");
 | 
			
		||||
			QDomElement path = doc.createElement("dest");
 | 
			
		||||
			QDomElement mode = doc.createElement("mode");
 | 
			
		||||
			name.appendChild(doc.createTextNode(native_file));
 | 
			
		||||
			path.appendChild(doc.createTextNode(native_dest));
 | 
			
		||||
			name.appendChild(doc.createTextNode(op.file));
 | 
			
		||||
			path.appendChild(doc.createTextNode(op.dest));
 | 
			
		||||
			// We need to add a 0 at the beginning here, because Qt doesn't convert to octal
 | 
			
		||||
			// correctly.
 | 
			
		||||
			mode.appendChild(doc.createTextNode("0" + QString::number(op.mode, 8)));
 | 
			
		||||
@@ -458,16 +455,16 @@ bool DownloadUpdateTask::writeInstallScript(UpdateOperationList &opsList, QStrin
 | 
			
		||||
			file.appendChild(path);
 | 
			
		||||
			file.appendChild(mode);
 | 
			
		||||
			installFiles.appendChild(file);
 | 
			
		||||
			QLOG_DEBUG() << "Will install file" << native_file;
 | 
			
		||||
			QLOG_DEBUG() << "Will install file " << op.file << " to " << op.dest;
 | 
			
		||||
		}
 | 
			
		||||
		break;
 | 
			
		||||
 | 
			
		||||
		case UpdateOperation::OP_DELETE:
 | 
			
		||||
		{
 | 
			
		||||
			// Delete the file.
 | 
			
		||||
			file.appendChild(doc.createTextNode(native_file));
 | 
			
		||||
			file.appendChild(doc.createTextNode(op.file));
 | 
			
		||||
			removeFiles.appendChild(file);
 | 
			
		||||
			QLOG_DEBUG() << "Will remove file" << native_file;
 | 
			
		||||
			QLOG_DEBUG() << "Will remove file" << op.file;
 | 
			
		||||
		}
 | 
			
		||||
		break;
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user