cztomczak / cefpython

Python bindings for the Chromium Embedded Framework (CEF)
Other
3.08k stars 473 forks source link

"blob_storage/" and "webrtc_event_logs/" directories are created in current working directory when using in-memory cache #432

Open cztomczak opened 6 years ago

cztomczak commented 6 years ago

This issue doesn't occur if you set ApplicationSettings.cache_path option.

Upstream CEF issue: https://bitbucket.org/chromiumembedded/cef/issues/2289/cefclient-creates-permanent-cache

The "GPUCache/" directory may be fixed by adding a command line switch --disable-gpu-shader-disk-cache, Issue #419 is to fix that.

MordicusEtCubitus commented 5 years ago

This is very nasty, I've got a lot of these repositories everywhere on my disk, and they have root owner I don't understand how they are created as I use a few brave and chromium.

Maybe this is not the right place to post for this but if you can explain how to prevent from this I'll be very pleased.

Thanks a lot !

dfb commented 4 years ago

Maybe this is not the right place to post for this but if you can explain how to prevent from this I'll be very pleased.

The ticket mentions that the problem doesn't happen if cache_path is set, so we're dealing with the problem by doing this:

import tempfile
settings = {'cache_path': tempfile.gettempdir(), ...}
cef.Initialize(settings=settings)

On Windows this will mean those directories will get created in ~/AppData/Local/Temp - so it won't prevent them from getting created, but they'll stay out of your working directory at least.

Boris-code commented 1 year ago
import tempfile
settings = {'cache_path': tempfile.gettempdir(), ...}
cef.Initialize(settings=settings)

how to import cef?