From 5f21e207c3ead9373d1374e36fb78fb9741b32af Mon Sep 17 00:00:00 2001 From: rakshasa Date: Sun, 2 Oct 2011 13:24:59 +0000 Subject: [PATCH] * Unlink the target filename of 'network.scgi.open_local' before opening. git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@1291 e378c898-3ddf-0310-93e7-cc216c733640 --- src/command_network.cc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/command_network.cc b/src/command_network.cc index ff586f66..a30087a7 100644 --- a/src/command_network.cc +++ b/src/command_network.cc @@ -39,6 +39,7 @@ #include #include #include +#include #include #include #include @@ -214,6 +215,7 @@ apply_scgi(const std::string& arg, int type) { int port, err; char dummy; char address[1024]; + std::string path; switch (type) { case 1: @@ -245,7 +247,10 @@ apply_scgi(const std::string& arg, int type) { case 2: default: - scgi->open_named(rak::path_expand(arg)); + path = rak::path_expand(arg); + + unlink(path.c_str()); + scgi->open_named(path); break; }