X-Git-Url: http://git.pjr.cc/?p=nodejs-repoproxy.git;a=blobdiff_plain;f=lib%2Frepo-yum.js;fp=lib%2Frepo-yum.js;h=38a8f8775f60b5ddf97117af6f50a6837247e76b;hp=57741ba2d283ef07cb0e3ae233449c46e10c7886;hb=629536ef67d8626f34dfe2c23f0acd916d8e1b64;hpb=d1bf8734f65364457e522c74fb3615d5f017874c diff --git a/lib/repo-yum.js b/lib/repo-yum.js index 57741ba..38a8f87 100644 --- a/lib/repo-yum.js +++ b/lib/repo-yum.js @@ -84,6 +84,16 @@ function maintain(name, repoinfo, files) { }) } + + // make sure we have a metadata file for our file + fs.stat(metafile, function(err, stats)) { + if(err) { + log.debug("file (%s) has no metadata file - moving for cleanup"); + cache.moveToCleanup(files[i]); + cache.moveToCleanup(metafile); + } + } + // check meta data fs.stat(files[i], function(err, stats) { var fsize = stats.size; @@ -103,7 +113,8 @@ function maintain(name, repoinfo, files) { } }); - }) + }); + } else { log.debug("file %s was ignored as its in download", files[i]); }