GitLab is used only for code review, issue tracking and project management. Canonical locations for source code are still https://gitweb.torproject.org/ https://git.torproject.org/ and git-rw.torproject.org.

Unverified Commit cecf9b37 authored by boklm's avatar boklm
Browse files

Update paths on OSX, following #13252 changes

parent 3499cd9f
......@@ -808,10 +808,21 @@ sub set_tbbpaths {
$tbbinfos->{datadir} = "$tbbinfos->{tbbdir}/TorBrowser/Data";
if ($tbbinfos->{os} eq 'MacOSX') {
$tbbinfos->{ffbin} = "$tbbinfos->{tbbdir}/Contents/MacOS/firefox";
unless ($tbbinfos->{version} =~ m/^5./) {
$tbbinfos->{ffprofiledir} = "$tbbinfos->{tbbdir}/Contents/Resources/distribution";
$tbbinfos->{tordir} = "$tbbinfos->{tbbdir}/Contents/Resources/TorBrowser/Tor";
$tbbinfos->{datadir} = "$tbbinfos->{tbbdir}/../TorBrowser-data";
$tbbinfos->{torrcdefaults} = "$tbbinfos->{tordir}/torrc-defaults";
$tbbinfos->{torgeoip} = "$tbbinfos->{tordir}/geoip";
mkdir $tbbinfos->{datadir} unless -d $tbbinfos->{datadir};
mkdir "$tbbinfos->{datadir}/Tor" unless -d "$tbbinfos->{datadir}/Tor";
}
}
$tbbinfos->{torrcdefaults} //= "$tbbinfos->{datadir}/Tor/torrc-defaults";
$tbbinfos->{torgeoip} //= "$tbbinfos->{datadir}/Tor/geoip";
$tbbinfos->{torbin} = "$tbbinfos->{tordir}/tor";
$tbbinfos->{ptdir} = winpath("$tbbinfos->{tordir}/PluggableTransports");
$tbbinfos->{ffprofiledir} = "$tbbinfos->{datadir}/Browser/profile.default";
$tbbinfos->{ffprofiledir} //= "$tbbinfos->{datadir}/Browser/profile.default";
}
sub new {
......
......@@ -122,7 +122,7 @@ sub start_tor {
chomp $hashed_password;
my $torrc_file;
if ($test->{use_default_config}) {
$torrc_file = "$tbbinfos->{datadir}/Tor/torrc-defaults";
$torrc_file = $tbbinfos->{torrcdefaults};
my @torrc = read_file($torrc_file);
foreach (@torrc) {
s/^ControlPort .*/ControlPort $options->{'tor-control-port'}/;
......@@ -149,11 +149,13 @@ sub start_tor {
$torrc_file = File::Temp->new;
write_file($torrc_file, $config);
}
write_file("$tbbinfos->{datadir}/Tor/torrc", ())
unless -f "$tbbinfos->{datadir}/Tor/torrc";
my @cmd = (winpath($tbbinfos->{torbin}), '--defaults-torrc',
winpath($torrc_file),
'-f', winpath("$tbbinfos->{datadir}/Tor/torrc"),
'DataDirectory', winpath("$tbbinfos->{datadir}/Tor"),
'GeoIPFile', winpath("$tbbinfos->{datadir}/Tor/geoip"),
'GeoIPFile', winpath($tbbinfos->{torgeoip}),
'__OwningControllerProcess', winpid($$));
$tbbinfos->{torpid} = fork;
if ($tbbinfos->{torpid} == 0) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment