Changeset 693 for branches


Ignore:
Timestamp:
Jul 21, 2006, 1:19:27 PM (13 years ago)
Author:
bcornec
Message:

Attempt to fix bug #7421 Unable to backup filenames with pattern *\'*
(https://developer.berlios.de/bugs/?func=detailbug&bug_id=7421&group_id=2524) by adding a test on ' detection and launching the popen with " instead.
The real problem here is the usage of popen which should be avoided for that.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/stable/mondo/mondo/common/libmondo-archive.c

    r684 r693  
    33623362    } else {
    33633363        file_to_openin = biggie_filename;
    3364         sprintf(command, "md5sum '%s'", biggie_filename);
     3364        if (strchr(biggie_filename,'\'') != NULL) {
     3365            sprintf(command, "md5sum \"%s\"", biggie_filename);
     3366        } else {
     3367            sprintf(command, "md5sum '%s'", biggie_filename);
     3368        }
    33653369        if (!(fin = popen(command, "r"))) {
    33663370            log_OS_error("Unable to popen-in command");
Note: See TracChangeset for help on using the changeset viewer.