Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fix create symlink: mkdir the parents directories, #10

  • Loading branch information...
commit d15260998fa38ad650fbbc8cd7437732ea107bd2 1 parent 73100b4
@Elbandi authored
Showing with 3 additions and 2 deletions.
  1. +3 −2 src/com/chrulri/droidtv/ChannelsActivity.java
View
5 src/com/chrulri/droidtv/ChannelsActivity.java
@@ -259,8 +259,9 @@ private void fixPermission(File file) {
private void createSymlink(File target, File symlink) {
try {
- Process p = ProcessUtils.runAsRoot("ln", "-s", target.getAbsolutePath(),
- symlink.getAbsolutePath());
+ Process p = ProcessUtils.runAsRoot(
+ "mkdir", "-p", symlink.getParentFile().getAbsolutePath(), "\n",
+ "ln", "-s", target.getAbsolutePath(), symlink.getAbsolutePath());
p.waitFor();
} catch (Exception e) {
Log.w(TAG, "Failed to create symlink: " + target.getAbsolutePath() + " <- "

1 comment on commit d152609

@chrulri

nice fix, please send me a pull-request

Please sign in to comment.
Something went wrong with that request. Please try again.