[asterisk-commits] tilghman: trunk r301403 - in /trunk: ./ main/file.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Tue Jan 11 18:27:34 CST 2011
Author: tilghman
Date: Tue Jan 11 18:27:30 2011
New Revision: 301403
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=301403
Log:
Merged revisions 301402 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8
........
r301402 | tilghman | 2011-01-11 18:26:39 -0600 (Tue, 11 Jan 2011) | 7 lines
Call execl() directly for a better solution for paths with spaces.
(closes issue #18600)
Reported by: ebroad
Patches:
20110111__issue18600__2.diff.txt uploaded by tilghman (license 14)
........
Modified:
trunk/ (props changed)
trunk/main/file.c
Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-1.8-merged' - no diff available.
Modified: trunk/main/file.c
URL: http://svnview.digium.com/svn/asterisk/trunk/main/file.c?view=diff&rev=301403&r1=301402&r2=301403
==============================================================================
--- trunk/main/file.c (original)
+++ trunk/main/file.c Tue Jan 11 18:27:30 2011
@@ -312,11 +312,9 @@
ast_translator_free_path(f->trans);
if (f->realfilename && f->filename) {
- size = strlen(f->filename) + strlen(f->realfilename) + 15;
- cmd = alloca(size);
- memset(cmd,0,size);
- snprintf(cmd, size, "/bin/mv -f \"%s\" \"%s\"", f->filename, f->realfilename);
- ast_safe_system(cmd);
+ if (ast_safe_fork(0) == 0) {
+ execl("/bin/mv", "mv", "-f", f->filename, f->realfilename, SENTINEL);
+ }
}
if (f->filename)
More information about the asterisk-commits
mailing list