~ubuntu-dev/ubuntu/lucid/mpd/lucid-201002110916

« back to all changes in this revision

Viewing changes to src/update.c

  • Committer: Bazaar Package Importer
  • Author(s): Alessio Treglia
  • Date: 2009-02-16 20:53:49 UTC
  • mfrom: (1.1.11 upstream) (2.1.10 sid)
  • Revision ID: james.westby@ubuntu.com-20090216205349-aui8v0kpkxukz8pp
Tags: 0.14.2-2ubuntu1
* Merge from debian unstable, Ubuntu remaining changes:
  - debian/control: Move avahi-daemon from Suggests field to Recommends
    field.
  - debian/mpd.init.d: Read mpd user from mpd.conf.

Show diffs side-by-side

added added

removed removed

Lines of Context:
108
108
        return 0;
109
109
}
110
110
 
 
111
static void
 
112
delete_directory(struct directory *directory);
 
113
 
111
114
/**
112
115
 * Recursively remove all sub directories and songs from a directory,
113
116
 * leaving an empty directory.
118
121
        int i;
119
122
 
120
123
        for (i = directory->children.nr; --i >= 0;)
121
 
                clear_directory(directory->children.base[i]);
122
 
        dirvec_clear(&directory->children);
 
124
                delete_directory(directory->children.base[i]);
 
125
 
 
126
        assert(directory->children.nr == 0);
123
127
 
124
128
        songvec_for_each(&directory->songs, delete_each_song, directory);
125
129
}
192
196
                                        S_ISDIR(st.st_mode)))
193
197
                        continue;
194
198
                LOG("removing directory: %s\n", dv->base[i]->path);
195
 
                dirvec_delete(dv, dv->base[i]);
 
199
                delete_directory(dv->base[i]);
196
200
                modified = true;
197
201
        }
198
202