mirror of
https://github.com/gryf/mc_adbfs.git
synced 2026-03-27 13:53:35 +01:00
Compare commits
11 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 8f3a22a729 | |||
| cbef13ccea | |||
|
|
9cfa834604 | ||
| b1a6219d21 | |||
| d16f0f06b8 | |||
| c2f07f5516 | |||
| e9b196eaf8 | |||
| 039c078a35 | |||
|
|
b088c45d3f | ||
|
|
c5559f7d41 | ||
|
|
9ffa1a13af |
2
Makefile
2
Makefile
@@ -32,7 +32,7 @@ endif
|
||||
|
||||
ifeq ($(FL8_EXISTS), 0)
|
||||
virtualenv_flake8:
|
||||
virtualenv -p python2 $(FL8_VENV)
|
||||
virtualenv -p python3 $(FL8_VENV)
|
||||
$(FL8_VENV)/bin/pip install flake8
|
||||
else
|
||||
virtualenv_flake8:
|
||||
|
||||
@@ -76,6 +76,7 @@ You can configure behaviour of this plugin using ``.ini`` file located under
|
||||
root =
|
||||
adb_command = adb
|
||||
adb_connect =
|
||||
try_su = false
|
||||
|
||||
where:
|
||||
|
||||
|
||||
9
adbfs
9
adbfs
@@ -80,6 +80,7 @@ class Conf(object):
|
||||
self.suppress_colors = False
|
||||
self.adb_command = 'adb'
|
||||
self.adb_connect = ''
|
||||
self.try_su = False
|
||||
|
||||
self.read()
|
||||
self.connect()
|
||||
@@ -187,7 +188,7 @@ class Conf(object):
|
||||
if not os.path.exists(conf_fname):
|
||||
return
|
||||
|
||||
cfg = configparser.SafeConfigParser()
|
||||
cfg = configparser.ConfigParser()
|
||||
cfg_map = {'debug': (cfg.getboolean, 'debug'),
|
||||
'dirs_to_skip': (cfg.get, 'dirs_to_skip'),
|
||||
'suppress_colors': (cfg.get, 'suppress_colors'),
|
||||
@@ -204,7 +205,7 @@ class Conf(object):
|
||||
pass
|
||||
|
||||
if self.dirs_to_skip and isinstance(self.dirs_to_skip, str):
|
||||
self.dirs_to_skip = json.loads(self.dirs_to_skip, encoding='ascii')
|
||||
self.dirs_to_skip = json.loads(self.dirs_to_skip)
|
||||
self.dirs_to_skip = [x.encode('utf-8') for x in self.dirs_to_skip]
|
||||
else:
|
||||
self.dirs_to_skip = []
|
||||
@@ -412,7 +413,7 @@ class Adb(object):
|
||||
sys.stderr.write('Cannot read directory. Is device connected?\n')
|
||||
return 1
|
||||
|
||||
lines = [l.strip() for l in lines.split('\n') if l.strip()]
|
||||
lines = [line.strip() for line in lines.split('\n') if line.strip()]
|
||||
if len(lines) == 1:
|
||||
reg_match = self.file_re.match(lines[0])
|
||||
entry = File(**reg_match.groupdict())
|
||||
@@ -458,7 +459,7 @@ class Adb(object):
|
||||
if not root:
|
||||
lscmd = self.conf.box['ls']
|
||||
else:
|
||||
lscmd = self.conf.box['rls'].format(shlex.quite(root.filepath))
|
||||
lscmd = self.conf.box['rls'].format(shlex.quote(root.filepath))
|
||||
|
||||
command = self._shell_cmd(True, *shlex.split(lscmd))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user