fixed directory blanking snag

master
endorphant 2016-05-16 01:02:06 -04:00
parent ae067e4053
commit 6013daad11
1 changed files with 11 additions and 5 deletions

View File

@ -200,8 +200,8 @@ def setup():
oldDir = SETTINGS.get("publish dir")
newDir = select_publish_dir()
SETTINGS.update({"publish dir": newDir})
make_publish_dir(newDir)
subprocess.call(["rm", "-rf", os.path.join(PUBLIC, oldDir)])
make_publish_dir(newDir)
core.load_files()
core.write("index.html")
else:
@ -415,9 +415,15 @@ press <enter> to begin recording your feels.
entryFile.write("\n"+entered+"\n")
entryFile.close()
subprocess.call([SETTINGS["editor"], entry])
left = ""
if publishing():
core.load_files()
core.write("index.html")
redraw("posted to "+LIVE+USER+"/"+SETTINGS["publish dir"]+"/index.html\n\nthanks for sharing your feels!")
left = "posted to "+LIVE+USER+"/"+SETTINGS["publish dir"]+"/index.html"
redraw(left + " thanks for sharing your feels!")
return
def send_feedback(entered, subject="none", mailbox=os.path.join(FEEDBACK, USER+"-"+time.strftime("%Y%m%d-%H%M")+".msg")):
@ -660,7 +666,7 @@ def unpublish():
if os.path.exists(publishing):
subprocess.call(["rm", "-rf", publishing])
subprocess.call(["rm", "-rf", WWW])
subprocess.call(["rm", WWW])
return