56
if ((force_flag & REMOVE_DIR_KEEP_NESTED_GIT) &&
57
!resolve_gitlink_ref(path->buf, "HEAD", submodule_head)) {
58
if (!quiet) {
59
- quote_path_relative(path->buf, strlen(path->buf), "ed, prefix);
59
+ quote_path_relative(path->buf, prefix, "ed);
60
printf(dry_run ? _(msg_would_skip_git_dir) : _(msg_skip_git_dir),
61
quoted.buf);
62
}
70
/* an empty dir could be removed even if it is unreadble */
71
res = dry_run ? 0 : rmdir(path->buf);
72
if (res) {
73
- quote_path_relative(path->buf, strlen(path->buf), "ed, prefix);
73
+ quote_path_relative(path->buf, prefix, "ed);
74
warning(_(msg_warn_remove_failed), quoted.buf);
75
*dir_gone = 0;
76
}
94
if (remove_dirs(path, prefix, force_flag, dry_run, quiet, &gone))
95
ret = 1;
96
if (gone) {
97
- quote_path_relative(path->buf, strlen(path->buf), "ed, prefix);
97
+ quote_path_relative(path->buf, prefix, "ed);
98
string_list_append(&dels, quoted.buf);
99
} else
100
*dir_gone = 0;
102
} else {
103
res = dry_run ? 0 : unlink(path->buf);
104
if (!res) {
105
- quote_path_relative(path->buf, strlen(path->buf), "ed, prefix);
105
+ quote_path_relative(path->buf, prefix, "ed);
106
string_list_append(&dels, quoted.buf);
107
} else {
108
- quote_path_relative(path->buf, strlen(path->buf), "ed, prefix);
108
+ quote_path_relative(path->buf, prefix, "ed);
109
warning(_(msg_warn_remove_failed), quoted.buf);
110
*dir_gone = 0;
111
ret = 1;
127
if (!res)
128
*dir_gone = 1;
129
else {
130
- quote_path_relative(path->buf, strlen(path->buf), "ed, prefix);
130
+ quote_path_relative(path->buf, prefix, "ed);
131
warning(_(msg_warn_remove_failed), quoted.buf);
132
*dir_gone = 0;
133
ret = 1;
262
if (remove_dirs(&directory, prefix, rm_flags, dry_run, quiet, &gone))
263
errors++;
264
if (gone && !quiet) {
265
- qname = quote_path_relative(directory.buf, directory.len, &buf, prefix);
265
+ qname = quote_path_relative(directory.buf, prefix, &buf);
266
printf(dry_run ? _(msg_would_remove) : _(msg_remove), qname);
267
}
268
}
272
continue;
273
res = dry_run ? 0 : unlink(ent->name);
274
if (res) {
275
- qname = quote_path_relative(ent->name, -1, &buf, prefix);
275
+ qname = quote_path_relative(ent->name, prefix, &buf);
276
warning(_(msg_warn_remove_failed), qname);
277
errors++;
278
} else if (!quiet) {
279
- qname = quote_path_relative(ent->name, -1, &buf, prefix);
279
+ qname = quote_path_relative(ent->name, prefix, &buf);
280
printf(dry_run ? _(msg_would_remove) : _(msg_remove), qname);
281
}
282
}