aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/plugins/Youtube.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/plugins/Youtube.cpp b/src/plugins/Youtube.cpp
index c31a0c3..76f98e2 100644
--- a/src/plugins/Youtube.cpp
+++ b/src/plugins/Youtube.cpp
@@ -329,16 +329,13 @@ namespace QuickMedia {
static std::vector<CommandArg> get_cookies() {
std::lock_guard<std::mutex> lock(cookies_mutex);
if(cookies_filepath.empty()) {
- char filename[] = "quickmedia.youtube.cookie.XXXXXX";
+ char filename[] = "/tmp/quickmedia.youtube.cookie.XXXXXX";
int fd = mkstemp(filename);
if(fd == -1)
return {};
close(fd);
- cookies_filepath = "/tmp/";
- cookies_filepath += filename;
- cookies_filepath += ".txt";
-
+ cookies_filepath = filename;
atexit(remove_cookies_file_at_exit);
}