determine OS to correctly save journal file and to switch back to one-branch development for convenience
This commit is contained in:
parent
4620116b89
commit
89f8a1362a
|
|
@ -11,8 +11,14 @@ YEAR = now.strftime("%Y")
|
||||||
MONTH = now.strftime("%m")
|
MONTH = now.strftime("%m")
|
||||||
DAY = now.strftime("%d")
|
DAY = now.strftime("%d")
|
||||||
journal_filename = "%s-%s-%s-Journal.txt" % (YEAR, MONTH, DAY)
|
journal_filename = "%s-%s-%s-Journal.txt" % (YEAR, MONTH, DAY)
|
||||||
|
|
||||||
|
# determine OS to correctly save journal file and to switch back to one-branch development for convenience
|
||||||
|
if os.name == 'posix':
|
||||||
journal_filename_path = "./%s" % journal_filename
|
journal_filename_path = "./%s" % journal_filename
|
||||||
|
|
||||||
|
if os.name == 'nt':
|
||||||
|
journal_filename_path = "$Env:AppData/%s" % journal_filename
|
||||||
|
|
||||||
if not os.path.exists(journal_filename_path):
|
if not os.path.exists(journal_filename_path):
|
||||||
with open(journal_filename_path, "w"):
|
with open(journal_filename_path, "w"):
|
||||||
pass
|
pass
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user