mirror of
https://github.com/f-droid/fdroidclient.git
synced 2026-04-21 07:18:05 -04:00
revert to previous, proven index.xml writing
It was added inc831cf77ccand changed in42d31eb0e6
This commit is contained in:
@@ -345,11 +345,13 @@ public class LocalRepoManager {
|
||||
serializer = XmlPullParserFactory.newInstance().newSerializer();
|
||||
}
|
||||
|
||||
public void build(Writer output) throws IOException, LocalRepoKeyStore.InitException {
|
||||
public void build(File file) throws IOException, LocalRepoKeyStore.InitException {
|
||||
Writer output = new FileWriter(file);
|
||||
serializer.setOutput(output);
|
||||
serializer.startDocument(null, null);
|
||||
tagFdroid();
|
||||
serializer.endDocument();
|
||||
output.close();
|
||||
}
|
||||
|
||||
private void tagFdroid() throws IOException, LocalRepoKeyStore.InitException {
|
||||
@@ -485,16 +487,12 @@ public class LocalRepoManager {
|
||||
|
||||
public void writeIndexJar() throws IOException {
|
||||
|
||||
FileWriter writer = null;
|
||||
try {
|
||||
writer = new FileWriter(xmlIndex);
|
||||
new IndexXmlBuilder(context, apps).build(writer);
|
||||
new IndexXmlBuilder(context, apps).build(xmlIndex);
|
||||
} catch (Exception e) {
|
||||
Log.e(TAG, "Could not write index jar", e);
|
||||
Toast.makeText(context, R.string.failed_to_create_index, Toast.LENGTH_LONG).show();
|
||||
return;
|
||||
} finally {
|
||||
Utils.closeQuietly(writer);
|
||||
}
|
||||
|
||||
BufferedOutputStream bo = new BufferedOutputStream(new FileOutputStream(xmlIndexJarUnsigned));
|
||||
|
||||
Reference in New Issue
Block a user