Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
shiyanhui committed Nov 1, 2013
1 parent 444e97c commit e1c73bd
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions FileHeader.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,17 +47,21 @@ def plugin_loaded():
BODY_PATH = os.path.join(PLUGIN_PATH, 'template/body')

sys.path.insert(0, PLUGIN_PATH)

shutil.rmtree(PLUGIN_PATH)

if os.path.exists(PLUGIN_PATH):
try:
shutil.rmtree(PLUGIN_PATH)
except:
pass

if not os.path.exists(PLUGIN_PATH):
os.mkdir(PLUGIN_PATH)

if os.path.exists(INSTALLED_PLGIN_PATH):
z = zipfile.ZipFile(INSTALLED_PLGIN_PATH, 'r')
for f in z.namelist():
z.extract(f, PLUGIN_PATH)
z.close()
if os.path.exists(INSTALLED_PLGIN_PATH):
z = zipfile.ZipFile(INSTALLED_PLGIN_PATH, 'r')
for f in z.namelist():
z.extract(f, PLUGIN_PATH)
z.close()

def Window():
'''Get current act``ive window'''
Expand Down

0 comments on commit e1c73bd

Please sign in to comment.