Permalink
Browse files
mirror: don't remove src dir if it ends with a slash (fix #233)
- Loading branch information...
Showing
with
2 additions
and
1 deletion.
-
+1
−1
src/MirrorJob.cc
-
+1
−0
src/xstring.h
|
|
@@ -1215,7 +1215,7 @@ int MirrorJob::Do() |
|
|
break;
|
|
|
|
|
|
// all jobs finished.
|
|
|
if(remove_source_dirs) {
|
|
|
if(remove_source_dirs && source_dir.last_char()!='/') {
|
|
|
// remove source directory once.
|
|
|
remove_source_dirs=false;
|
|
|
if(script)
|
|
|
|
|
|
@@ -145,6 +145,7 @@ class xstring_c : public xstring0 |
|
|
bool eq_nc(const char *s) const { return !xstrcasecmp(buf,s); }
|
|
|
size_t length() const { return xstrlen(buf); }
|
|
|
void set_length(size_t n) { if(buf) buf[n]=0; }
|
|
|
char last_char() const { size_t len=length(); return len>0?buf[len-1]:0; }
|
|
|
|
|
|
void unset() { xfree(buf); buf=0; }
|
|
|
void _set(const char *s) { buf=xstrdup(s); }
|
|
|
|
0 comments on commit
ad49e07