Merge pull request #1894 from coreos-inc/dockerfile-upload-bugs
Fix bugs around reading in datafiles and Dockerfiles
This commit is contained in:
commit
e313d59138
2 changed files with 7 additions and 2 deletions
|
@ -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);
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
Reference in a new issue