mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-10 21:23:58 +01:00
Merge branch 'ticket32172_once_again'
This commit is contained in:
commit
08bfc2d71a
4
changes/ticket32172
Normal file
4
changes/ticket32172
Normal file
@ -0,0 +1,4 @@
|
||||
o Minor features (tests, Android):
|
||||
- When running the unit tests on Android, create temporary files
|
||||
in a subdirectory of /data/local/tmp. Closes ticket
|
||||
32172. Based on a patch from Hans-Christoph Steiner.
|
@ -89,6 +89,17 @@ setup_directory(void)
|
||||
(int)getpid(), rnd32);
|
||||
r = mkdir(temp_dir);
|
||||
}
|
||||
#elif defined(__ANDROID__)
|
||||
/* tor might not like the default perms, so create a subdir */
|
||||
tor_snprintf(temp_dir, sizeof(temp_dir),
|
||||
"/data/local/tmp/tor_%d_%d_%s",
|
||||
(int) getuid(), (int) getpid(), rnd32);
|
||||
r = mkdir(temp_dir, 0700);
|
||||
if (r) {
|
||||
fprintf(stderr, "Can't create directory %s:", temp_dir);
|
||||
perror("");
|
||||
exit(1);
|
||||
}
|
||||
#else /* !defined(_WIN32) */
|
||||
tor_snprintf(temp_dir, sizeof(temp_dir), "/tmp/tor_test_%d_%s",
|
||||
(int) getpid(), rnd32);
|
||||
|
Loading…
Reference in New Issue
Block a user