Merge pull request #1894 from coreos-inc/dockerfile-upload-bugs

Fix bugs around reading in datafiles and Dockerfiles
This commit is contained in:
josephschorr 2016-09-29 22:47:06 +02:00 committed by GitHub
commit e313d59138
2 changed files with 7 additions and 2 deletions

View file

@ -133,7 +133,9 @@ angular.module('quay').factory('DataFileService', [function() {
dataFileService.readDataArrayAsPossibleArchive = function(buf, success, failure) {
dataFileService.tryAsZip_(buf, success, function() {
dataFileService.tryAsTarGz_(buf, success, failure);
dataFileService.tryAsTarGz_(buf, success, function() {
dataFileService.tryAsTar_(buf, success, failure);
});
});
};

View file

@ -87,7 +87,10 @@ angular.module('quay').factory('DockerfileService', ['DataFileService', 'Config'
var dataArray = reader.result;
DataFileService.readDataArrayAsPossibleArchive(dataArray, function(files) {
processFiles(files, dataArray, success, failure);
}, failure);
}, function() {
// Not an archive. Read directly as a single file.
processFiles([], dataArray, success, failure);
});
};
reader.onerror = failure;