create AppData/Gajim folder if it doesn't exists
This commit is contained in:
parent
ab2ddc4935
commit
2fa280acbb
|
@ -57,7 +57,10 @@ if os.name == 'nt':
|
||||||
import warnings
|
import warnings
|
||||||
|
|
||||||
if os.name == 'nt':
|
if os.name == 'nt':
|
||||||
log_file = os.path.join(os.environ['APPDATA'], 'Gajim', 'gajim.log')
|
log_path = os.path.join(os.environ['APPDATA'], 'Gajim')
|
||||||
|
if not os.path.exists(log_path):
|
||||||
|
os.mkdir(log_path, 0700)
|
||||||
|
log_file = os.path.join(log_path, 'gajim.log')
|
||||||
fout = open(log_file, 'a')
|
fout = open(log_file, 'a')
|
||||||
sys.stdout = fout
|
sys.stdout = fout
|
||||||
sys.stderr = fout
|
sys.stderr = fout
|
||||||
|
|
Loading…
Reference in New Issue