mirror of
https://github.com/openstf/stf
synced 2025-10-04 02:09:32 +02:00
fix spell error
This commit is contained in:
parent
855964bff1
commit
dff5835105
4 changed files with 8 additions and 8 deletions
|
@ -19,7 +19,7 @@ module.exports = syrup.serial()
|
|||
var log = logger.createLogger('device:plugins:filesystem')
|
||||
var plugin = Object.create(null)
|
||||
|
||||
plugin.retrive = function(file) {
|
||||
plugin.retrieve = function(file) {
|
||||
log.info('Retriving file %s', 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/
|
||||
return storage.store('blob', transfer, {
|
||||
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
|
||||
})
|
||||
})
|
||||
|
@ -49,7 +49,7 @@ module.exports = syrup.serial()
|
|||
|
||||
router.on(wire.FileSystemGetMessage, function(channel, message) {
|
||||
var reply = wireutil.reply(options.serial)
|
||||
plugin.retrive(message.file)
|
||||
plugin.retrieve(message.file)
|
||||
.then(function(file){
|
||||
push.send([
|
||||
channel,
|
||||
|
@ -57,7 +57,7 @@ module.exports = syrup.serial()
|
|||
])
|
||||
})
|
||||
.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([
|
||||
channel,
|
||||
reply.fail(err.message)
|
||||
|
|
|
@ -826,7 +826,7 @@ module.exports = function(options) {
|
|||
)
|
||||
])
|
||||
})
|
||||
.on('fs.retrive', function(channel, responseChannel, data) {
|
||||
.on('fs.retrieve', function(channel, responseChannel, data) {
|
||||
joinChannel(responseChannel)
|
||||
push.send([
|
||||
channel
|
||||
|
|
|
@ -225,8 +225,8 @@ module.exports = function ControlServiceFactory(
|
|||
return sendTwoWay('screen.capture')
|
||||
}
|
||||
|
||||
this.fsretrive = function(file){
|
||||
return sendTwoWay('fs.retrive', {
|
||||
this.fsretrieve = function(file){
|
||||
return sendTwoWay('fs.retrieve', {
|
||||
file: file,
|
||||
})
|
||||
}
|
||||
|
|
|
@ -32,7 +32,7 @@ module.exports = function FsCtrl($scope, $timeout) {
|
|||
|
||||
$scope.getFile = function(file){
|
||||
var path = '/'+$scope.paths.join('/')+'/'+file;
|
||||
$scope.control.fsretrive(path)
|
||||
$scope.control.fsretrieve(path)
|
||||
.then(function(result){
|
||||
location.href = result.body.href+"?download"
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue