Skip to content

Commit

Permalink
os.path.exists("") is True
Browse files Browse the repository at this point in the history
so need to check for this explicitly
  • Loading branch information
jefferis committed Apr 15, 2015
1 parent 924aaf8 commit a7346be
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion CMTK_Registration_GUI.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def textValueChanged(self, tvc):
#print "regroot:"+regroot+ " exists!"
return
imgdir = imgdirf.getText()
if os.path.exists(imgdir):
if len(imgdir)>0 and os.path.exists(imgdir):
regrootf.setText(os.path.dirname(imgdir))
return

Expand Down

0 comments on commit a7346be

Please sign in to comment.