> > ! if os.path.exists(name+'/cur'): > > to use os.path.join(). os.path.join() will ignore all preceding entries as soon as one of the entries starts with a '/'. (Furthermore, '/' is not cross platform, try to stick to os.sep.) So make sure it's os.path.join(name, 'cur')