{
options->fetchedRemoteModificationDates = true;
- FILE *adbCommand = runAdb(*options, QLatin1String(" ls ") + directory);
+ FILE *adbCommand = runAdb(*options, QLatin1String(" shell cat ") + directory + QLatin1String("/modification.txt"));
if (adbCommand == 0)
return false;
char buffer[512];
+ QString qtPath;
+ while (fgets(buffer, sizeof(buffer), adbCommand) != 0)
+ qtPath += QString::fromUtf8(buffer, qstrlen(buffer));
+
+ pclose(adbCommand);
+
+ if (options->qtInstallDirectory != qtPath) {
+ adbCommand = runAdb(*options, QLatin1String(" shell rm -r ") + directory);
+ if (options->verbose) {
+ fprintf(stdout, " -- Removing old Qt libs.\n");
+ while (fgets(buffer, sizeof(buffer), adbCommand) != 0)
+ fprintf(stdout, "%s", buffer);
+ }
+ pclose(adbCommand);
+ }
+
+ adbCommand = runAdb(*options, QLatin1String(" ls ") + directory);
+ if (adbCommand == 0)
+ return false;
+
while (fgets(buffer, sizeof(buffer), adbCommand) != 0) {
QByteArray line = QByteArray::fromRawData(buffer, qstrlen(buffer));
-
if (line.count() < (3 * 8 + 3))
continue;
if (line.at(8) != ' '
fprintf(stderr, "Cannot create modification timestamp.\n");
return false;
}
+ file.write(options->qtInstallDirectory.toUtf8());
}
return true;