~azzar1/unity/add-show-desktop-key

« back to all changes in this revision

Viewing changes to bin/ivle-refreshfilesystem

  • Committer: William Grant
  • Date: 2009-12-08 02:06:58 UTC
  • Revision ID: grantw@unimelb.edu.au-20091208020658-lraeb2yb8ja2khra
Don't attempt to create the junk dir if it already exists.

Show diffs side-by-side

added added

removed removed

Lines of Context:
45
45
 
46
46
def junk(parent, name):
47
47
    """Move the named directory into a junk directory alongside the parent."""
48
 
    os.makedirs(get_junk_dir(parent))
 
48
    if not os.path.exists(get_junk_dir(parent)):
 
49
        os.makedirs(get_junk_dir(parent))
49
50
    shutil.move(
50
51
        os.path.join(parent, name),
51
52
        os.path.join(get_junk_dir(parent), name))