[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [torouter/master] Use correct tmp filenames and paths
commit fe239d1d9e8a590798abc31cd7bf7cf11324cfd5
Author: Arturo FilastoÌ? <hellais@xxxxxxxxxxxxxx>
Date: Fri Aug 19 17:33:58 2011 +0200
Use correct tmp filenames and paths
---
packages/torouter-web/src/tui/config.py | 5 +++--
packages/torouter-web/src/tui/utils/fileio.py | 4 ++--
2 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/packages/torouter-web/src/tui/config.py b/packages/torouter-web/src/tui/config.py
index f3f8dcc..73087f2 100644
--- a/packages/torouter-web/src/tui/config.py
+++ b/packages/torouter-web/src/tui/config.py
@@ -11,7 +11,8 @@ globals = {}
# Add your own (username, password) pair
authinfo = ("test", "test")
-interfaces_file = os.getcwd() + "/../../torouter-prep/configs/interfaces"
+#interfaces_file = os.getcwd() + "/../../torouter-prep/configs/interfaces"
#torrc_file = os.getcwd() + "/../../torouter-prep/configs/torrc"
-torrc_file = "/tmp/torrc"
+torrc_file = "/var/tmp/tor-tui/torrc"
+interfaces_file = "/var/tmp/tor-tui/interfaces"
diff --git a/packages/torouter-web/src/tui/utils/fileio.py b/packages/torouter-web/src/tui/utils/fileio.py
index 5b88504..c6574b7 100644
--- a/packages/torouter-web/src/tui/utils/fileio.py
+++ b/packages/torouter-web/src/tui/utils/fileio.py
@@ -1,12 +1,12 @@
import os
def write(files):
- tmp_dir = "/var/tmp/tor-tui"
+ tmp_dir = "/var/tmp/tor-tui/"
tmpfiles = []
for file in files:
if not os.path.exists(tmp_dir):
os.mkdir(tmp_dir)
- tmpfile = tmp_dir + file[0].split("/")[-1:][0] + ".tmp"
+ tmpfile = tmp_dir + file[0].split("/")[-1:][0]
tmpfiles.append((tmpfile,file[0]))
# open the tmp file for write
f = open(tmpfile, 'w')
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits