diff --git a/source/backends/debian/debpkgindex.d b/source/backends/debian/debpkgindex.d index 393dacb7..45a05cfd 100644 --- a/source/backends/debian/debpkgindex.d +++ b/source/backends/debian/debpkgindex.d @@ -94,6 +94,8 @@ public: { immutable langs = findTranslations (suite, section); + logDebug ("Found translations for: %s", langs.join(", ")); + foreach (const ref lang; langs) { string fname; @@ -117,7 +119,6 @@ public: auto tagf = new TagFile (); tagf.open (fname); - logDebug ("Opened: %s", fname); do { auto pkgname = tagf.readField ("Package"); auto rawDesc = tagf.readField ("Description-%s".format (lang)); diff --git a/source/utils.d b/source/utils.d index e741edec..e75384ea 100644 --- a/source/utils.d +++ b/source/utils.d @@ -411,21 +411,21 @@ string[] getFileContents (const string path, const uint retryCount = 5) @trusted size_t sz = 0; - auto f = open_memstream (&ptr, &sz); - scope (exit) fclose (f); - - auto file = File.wrapFile (f); - if (path.isRemote) { - download (path, file, retryCount); + { + auto f = open_memstream (&ptr, &sz); + scope (exit) fclose (f); + auto file = File.wrapFile (f); + download (path, file, retryCount); + } + + return to!string (ptr.fromStringz).splitLines; } else { if (!std.file.exists (path)) throw new Exception ("No such file '%s'", path); return std.file.readText (path).splitLines; } - - return to!string (ptr.fromStringz).splitLines; } /**