From cf71ae189f5ea8d3c39e219485b87a69fb5db5bf Mon Sep 17 00:00:00 2001 From: "Ira W. Snyder" Date: Tue, 9 Jan 2007 23:48:57 -0800 Subject: [PATCH] [RSUTIL] Fix directory handling Fix the directory handling to make it more os-portable, using os.join() instead of hardcoded paths. Signed-off-by: Ira W. Snyder --- rsutil/config.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rsutil/config.py b/rsutil/config.py index 5b68757..bc8c58e 100644 --- a/rsutil/config.py +++ b/rsutil/config.py @@ -32,7 +32,7 @@ import os, ConfigParser class config (object): """A simple class to hold the default configs for the whole program""" - DEFAULT_CONFIG='~/.config/rarslave2/rarslave2.conf' + DEFAULT_CONFIG=os.path.join ('~','.config','rarslave2','rarslave2.conf') def __read_config(self, filename=DEFAULT_CONFIG): """Attempt to open and read the rarslave config file""" @@ -140,7 +140,7 @@ class config (object): def __init__(self): self.__defaults = { - ('directories', 'working_directory') : '~/downloads/usenet', + ('directories', 'working_directory') : os.path.join ('~','downloads','usenet'), ('directories', 'extract_directory') : None, ('options', 'recursive') : True, ('options', 'interactive') : False, -- 2.25.1