mirror of
https://github.com/rakshasa/rtorrent.git
synced 2026-10-20 08:06:18 +00:00
* 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
This commit is contained in:
@@ -39,6 +39,7 @@
|
|||||||
#include <functional>
|
#include <functional>
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
#include <cstdio>
|
#include <cstdio>
|
||||||
|
#include <unistd.h>
|
||||||
#include <rak/address_info.h>
|
#include <rak/address_info.h>
|
||||||
#include <rak/path.h>
|
#include <rak/path.h>
|
||||||
#include <torrent/connection_manager.h>
|
#include <torrent/connection_manager.h>
|
||||||
@@ -214,6 +215,7 @@ apply_scgi(const std::string& arg, int type) {
|
|||||||
int port, err;
|
int port, err;
|
||||||
char dummy;
|
char dummy;
|
||||||
char address[1024];
|
char address[1024];
|
||||||
|
std::string path;
|
||||||
|
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case 1:
|
case 1:
|
||||||
@@ -245,7 +247,10 @@ apply_scgi(const std::string& arg, int type) {
|
|||||||
|
|
||||||
case 2:
|
case 2:
|
||||||
default:
|
default:
|
||||||
scgi->open_named(rak::path_expand(arg));
|
path = rak::path_expand(arg);
|
||||||
|
|
||||||
|
unlink(path.c_str());
|
||||||
|
scgi->open_named(path);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user