Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
PlayWallDesktop
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
PlayWall
PlayWallDesktop
Commits
5e7e23a0
Commit
5e7e23a0
authored
9 years ago
by
tobias
Browse files
Options
Downloads
Patches
Plain Diff
Change UpdateRegistery#needsAdminPermission
parent
78ff31f7
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
PlayWallCore/src/de/tobias/playpad/update/UpdateRegistery.java
+9
-3
9 additions, 3 deletions
...allCore/src/de/tobias/playpad/update/UpdateRegistery.java
with
9 additions
and
3 deletions
PlayWallCore/src/de/tobias/playpad/update/UpdateRegistery.java
+
9
−
3
View file @
5e7e23a0
...
...
@@ -6,6 +6,7 @@ import java.nio.file.Files;
import
java.util.ArrayList
;
import
java.util.List
;
import
de.tobias.utils.util.OS
;
import
de.tobias.utils.util.SystemUtils
;
import
net.minidev.json.JSONArray
;
import
net.minidev.json.JSONObject
;
...
...
@@ -41,8 +42,6 @@ public class UpdateRegistery {
private
static
final
String
URL
=
"url"
;
private
static
final
String
EXECUTE_FILE
=
"executePath"
;
public
static
String
buildParamaterString
(
String
downloadPath
)
{
JSONObject
data
=
new
JSONObject
();
data
.
put
(
DOWNLOAD_PATH
,
downloadPath
);
...
...
@@ -70,6 +69,13 @@ public class UpdateRegistery {
if
(!
Files
.
isWritable
(
updatable
.
getLocalPath
()))
{
return
true
;
}
if
(
OS
.
isWindows
())
{
try
{
if
(
Files
.
getOwner
(
updatable
.
getLocalPath
()).
getName
().
toLowerCase
().
contains
(
"admin"
))
{
return
true
;
}
}
catch
(
IOException
e
)
{}
}
}
return
false
;
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment