Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
com.ccwangluo.accelerator
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
sheteng
com.ccwangluo.accelerator
Commits
0006e0c9
Commit
0006e0c9
authored
Mar 15, 2019
by
Mygod
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix new nullable warnings
parent
125fc3b9
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
4 deletions
+5
-4
core/src/main/java/com/github/shadowsocks/bg/Executable.kt
core/src/main/java/com/github/shadowsocks/bg/Executable.kt
+1
-1
plugin/src/main/java/com/github/shadowsocks/plugin/PathProvider.kt
...c/main/java/com/github/shadowsocks/plugin/PathProvider.kt
+4
-3
No files found.
core/src/main/java/com/github/shadowsocks/bg/Executable.kt
View file @
0006e0c9
...
@@ -37,7 +37,7 @@ object Executable {
...
@@ -37,7 +37,7 @@ object Executable {
private
val
EXECUTABLES
=
setOf
(
SS_LOCAL
,
REDSOCKS
,
TUN2SOCKS
)
private
val
EXECUTABLES
=
setOf
(
SS_LOCAL
,
REDSOCKS
,
TUN2SOCKS
)
fun
killAll
()
{
fun
killAll
()
{
for
(
process
in
File
(
"/proc"
).
listFiles
{
_
,
name
->
TextUtils
.
isDigitsOnly
(
name
)
})
{
for
(
process
in
File
(
"/proc"
).
listFiles
{
_
,
name
->
TextUtils
.
isDigitsOnly
(
name
)
}
?:
return
)
{
val
exe
=
File
(
try
{
val
exe
=
File
(
try
{
File
(
process
,
"cmdline"
).
inputStream
().
bufferedReader
().
readText
()
File
(
process
,
"cmdline"
).
inputStream
().
bufferedReader
().
readText
()
}
catch
(
_
:
IOException
)
{
}
catch
(
_
:
IOException
)
{
...
...
plugin/src/main/java/com/github/shadowsocks/plugin/PathProvider.kt
View file @
0006e0c9
...
@@ -41,13 +41,14 @@ class PathProvider internal constructor(baseUri: Uri, private val cursor: Matrix
...
@@ -41,13 +41,14 @@ class PathProvider internal constructor(baseUri: Uri, private val cursor: Matrix
var
sub
=
to
+
file
.
name
var
sub
=
to
+
file
.
name
if
(
basePath
.
startsWith
(
sub
))
if
(
file
.
isDirectory
)
{
if
(
basePath
.
startsWith
(
sub
))
if
(
file
.
isDirectory
)
{
sub
+=
'/'
sub
+=
'/'
file
.
listFiles
().
forEach
{
addTo
(
it
,
sub
,
mode
)
}
file
.
listFiles
()
!!
.
forEach
{
addTo
(
it
,
sub
,
mode
)
}
}
else
addPath
(
sub
,
mode
)
}
else
addPath
(
sub
,
mode
)
return
this
return
this
}
}
fun
addAt
(
file
:
File
,
at
:
String
=
""
,
mode
:
Int
=
0b110100100
):
PathProvider
{
fun
addAt
(
file
:
File
,
at
:
String
=
""
,
mode
:
Int
=
0b110100100
):
PathProvider
{
if
(
basePath
.
startsWith
(
at
))
if
(
basePath
.
startsWith
(
at
))
{
if
(
file
.
isDirectory
)
file
.
listFiles
().
forEach
{
addTo
(
it
,
at
,
mode
)
}
else
addPath
(
at
,
mode
)
if
(
file
.
isDirectory
)
file
.
listFiles
()
!!
.
forEach
{
addTo
(
it
,
at
,
mode
)
}
else
addPath
(
at
,
mode
)
}
return
this
return
this
}
}
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment