mirror of https://github.com/BOINC/boinc.git
lib: changed boinc_copy() to enclose path strings in quotes instead of escaping spaces
svn path=/trunk/boinc/; revision=15894
This commit is contained in:
parent
00ee66965f
commit
c2c5d04c31
|
@ -6819,3 +6819,10 @@ David 19 Aug 2008
|
|||
lib/
|
||||
filesys.C
|
||||
str_util.C,h
|
||||
|
||||
Charlie 19 Aug 2008
|
||||
- lib: changed boinc_copy() to enclose path strings in quotes instead
|
||||
of escaping spaces.
|
||||
|
||||
lib/
|
||||
filesys.C
|
||||
|
|
|
@ -492,14 +492,12 @@ int boinc_copy(const char* orig, const char* newf) {
|
|||
}
|
||||
return 0;
|
||||
#elif defined(__EMX__)
|
||||
char cmd[1024], cmd_esc[1024];
|
||||
sprintf(cmd, "copy %s %s", orig, newf);
|
||||
string_substitute(cmd, cmd_esc, sizeof(cmd_esc), " ", "\\ ");
|
||||
char cmd[1024];
|
||||
sprintf(cmd, "copy \"%s\" \"%s\"", orig, newf);
|
||||
return system(cmd_esc);
|
||||
#else
|
||||
char cmd[1024], cmd_esc[1024];
|
||||
sprintf(cmd, "cp %s %s", orig, newf);
|
||||
string_substitute(cmd, cmd_esc, sizeof(cmd_esc), " ", "\\ ");
|
||||
sprintf(cmd, "cp \"%s\" \"%s\"", orig, newf);
|
||||
return system(cmd_esc);
|
||||
#endif
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue