You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

29 lines
602 B

diff -u -r ../PRoot-5.1.0/src/path/temp.c ./src/path/temp.c
--- ../PRoot-5.1.0/src/path/temp.c 2014-12-15 09:18:11.000000000 -0500
+++ ./src/path/temp.c 2016-01-08 19:40:46.901462550 -0500
@@ -120,9 +120,14 @@
{
int result;
int status;
- char *cwd;
+#ifdef __ANDROID__
+ char cwd[PATH_MAX];
+ getcwd(cwd, PATH_MAX);
+#else
+ char *cwd;
cwd = get_current_dir_name();
+#endif
status = chmod(path, 0700);
if (status < 0) {
@@ -163,7 +168,9 @@
result = -1;
note(NULL, ERROR, SYSTEM, "can't chdir to '%s'", cwd);
}
+#ifndef __ANDROID__
free(cwd);
+#endif
}
return result;