Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 625158 | Differences between
and this patch

Collapse All | Expand All

(-)a/src/third_party/backup/copier.cc (-3 / +9 lines)
Lines 107-116 Link Here
107
    int r = 0;
107
    int r = 0;
108
    char *fname = 0;
108
    char *fname = 0;
109
    size_t n_known = 0;
109
    size_t n_known = 0;
110
    char *dupname;
110
    {
111
    {
111
        with_mutex_locked tm(&m_todo_mutex, BACKTRACE(NULL));
112
        with_mutex_locked tm(&m_todo_mutex, BACKTRACE(NULL));
112
        // Start with "."
113
        // Start with "."
113
        m_todo.push_back(strdup("."));
114
	dupname = strdup(".");
115
        m_todo.push_back(dupname);
114
        n_known = m_todo.size();
116
        n_known = m_todo.size();
115
    }
117
    }
116
    while (n_known != 0) {
118
    while (n_known != 0) {
Lines 697-702 Link Here
697
    int error = 0;
699
    int error = 0;
698
    with_mutex_locked tm(&m_todo_mutex, BACKTRACE(NULL));
700
    with_mutex_locked tm(&m_todo_mutex, BACKTRACE(NULL));
699
    struct dirent const *e = NULL;
701
    struct dirent const *e = NULL;
702
    char *dupname;
700
    while((e = readdir(dir)) != NULL) {
703
    while((e = readdir(dir)) != NULL) {
701
        if (!the_manager.copy_is_enabled()) break;
704
        if (!the_manager.copy_is_enabled()) break;
702
        if(is_dot(e)) {
705
        if(is_dot(e)) {
Lines 716-723 Link Here
716
                goto out;
719
                goto out;
717
            }
720
            }
718
            
721
            
722
	    dupname = strdup(new_name);
719
            // Add it to our todo list.
723
            // Add it to our todo list.
720
            m_todo.push_back(strdup(new_name));
724
            m_todo.push_back(dupname);
721
            TRACE("~~~Added this file to todo list:", new_name);
725
            TRACE("~~~Added this file to todo list:", new_name);
722
        }
726
        }
723
    }
727
    }
Lines 730-736 Link Here
730
//
734
//
731
void copier::add_file_to_todo(const char *file) throw() {
735
void copier::add_file_to_todo(const char *file) throw() {
732
    with_mutex_locked tm(&m_todo_mutex, BACKTRACE(NULL));
736
    with_mutex_locked tm(&m_todo_mutex, BACKTRACE(NULL));
733
    m_todo.push_back(strdup(file));
737
    char *dupname;
738
    dupname = strdup(file);
739
    m_todo.push_back(dupname);
734
}
740
}
735
741
736
////////////////////////////////////////////////////////////////////////////////
742
////////////////////////////////////////////////////////////////////////////////

Return to bug 625158