1
0
Fork 0
mirror of https://github.com/openstf/stf synced 2025-10-04 02:09:32 +02:00

fix spell error

This commit is contained in:
hzsunshx 2015-09-22 17:38:41 +08:00
parent 855964bff1
commit dff5835105
4 changed files with 8 additions and 8 deletions

View file

@ -19,7 +19,7 @@ module.exports = syrup.serial()
var log = logger.createLogger('device:plugins:filesystem') var log = logger.createLogger('device:plugins:filesystem')
var plugin = Object.create(null) var plugin = Object.create(null)
plugin.retrive = function(file) { plugin.retrieve = function(file) {
log.info('Retriving file %s', file) log.info('Retriving file %s', file)
return adb.pull(options.serial, file) return adb.pull(options.serial, file)
@ -37,7 +37,7 @@ module.exports = syrup.serial()
// if this is a new store type, somethings need add to units/storage/plugins/ // if this is a new store type, somethings need add to units/storage/plugins/
return storage.store('blob', transfer, { return storage.store('blob', transfer, {
filename: path.basename(file), filename: path.basename(file),
contentType: 'text/plain', // FIXME(ssx): need to detect file type contentType: 'application/octet-stream', // FIXME(ssx): need to detect file type
knownLength: stats.size knownLength: stats.size
}) })
}) })
@ -49,7 +49,7 @@ module.exports = syrup.serial()
router.on(wire.FileSystemGetMessage, function(channel, message) { router.on(wire.FileSystemGetMessage, function(channel, message) {
var reply = wireutil.reply(options.serial) var reply = wireutil.reply(options.serial)
plugin.retrive(message.file) plugin.retrieve(message.file)
.then(function(file){ .then(function(file){
push.send([ push.send([
channel, channel,
@ -57,7 +57,7 @@ module.exports = syrup.serial()
]) ])
}) })
.catch(function(err){ .catch(function(err){
log.error('File retrive %s failed\n%s', message.file, err.stack) log.error('File retrieve %s failed\n%s', message.file, err.stack)
push.send([ push.send([
channel, channel,
reply.fail(err.message) reply.fail(err.message)

View file

@ -826,7 +826,7 @@ module.exports = function(options) {
) )
]) ])
}) })
.on('fs.retrive', function(channel, responseChannel, data) { .on('fs.retrieve', function(channel, responseChannel, data) {
joinChannel(responseChannel) joinChannel(responseChannel)
push.send([ push.send([
channel channel

View file

@ -225,8 +225,8 @@ module.exports = function ControlServiceFactory(
return sendTwoWay('screen.capture') return sendTwoWay('screen.capture')
} }
this.fsretrive = function(file){ this.fsretrieve = function(file){
return sendTwoWay('fs.retrive', { return sendTwoWay('fs.retrieve', {
file: file, file: file,
}) })
} }

View file

@ -32,7 +32,7 @@ module.exports = function FsCtrl($scope, $timeout) {
$scope.getFile = function(file){ $scope.getFile = function(file){
var path = '/'+$scope.paths.join('/')+'/'+file; var path = '/'+$scope.paths.join('/')+'/'+file;
$scope.control.fsretrive(path) $scope.control.fsretrieve(path)
.then(function(result){ .then(function(result){
location.href = result.body.href+"?download" location.href = result.body.href+"?download"
}) })