[tor-commits] [sandboxed-tor-browser/master] Recreate the Caches directory if missing.

yawning at torproject.org yawning at torproject.org
Mon Dec 26 01:34:46 UTC 2016


commit 244bdb6cb874c5f6df27b6c46ed0e45440a83713
Author: Yawning Angel <yawning at schwanenlied.me>
Date:   Fri Dec 23 03:20:46 2016 +0000

    Recreate the Caches directory if missing.
    
    Applying the non-incremental update seems to obliterate this, so ensure
    it is present.
---
 src/cmd/sandboxed-tor-browser/internal/sandbox/application.go | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/cmd/sandboxed-tor-browser/internal/sandbox/application.go b/src/cmd/sandboxed-tor-browser/internal/sandbox/application.go
index 122e714..a126e4f 100644
--- a/src/cmd/sandboxed-tor-browser/internal/sandbox/application.go
+++ b/src/cmd/sandboxed-tor-browser/internal/sandbox/application.go
@@ -97,7 +97,10 @@ func RunTorBrowser(cfg *config.Config, manif *config.Manifest, tor *tor.Tor) (cm
 	realDesktopDir := filepath.Join(realBrowserHome, "Desktop")
 	realDownloadsDir := filepath.Join(realBrowserHome, "Downloads")
 
-	// Ensure that the `Downloads` and `Desktop` mount points exist.
+	// Ensure that the `Caches`, `Downloads` and `Desktop` mount points exist.
+	if err = os.MkdirAll(realCachesDir, DirMode); err != nil {
+		return
+	}
 	if err = os.MkdirAll(realDesktopDir, DirMode); err != nil {
 		return
 	}



More information about the tor-commits mailing list