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

Collapse All | Expand All

(-)mongo-r5.0.26.old/src/mongo/db/initialize_server_global_state.cpp (-2 / +2 lines)
Lines 34-40 Link Here
34
#include "mongo/db/initialize_server_global_state.h"
34
#include "mongo/db/initialize_server_global_state.h"
35
#include "mongo/db/initialize_server_global_state_gen.h"
35
#include "mongo/db/initialize_server_global_state_gen.h"
36
36
37
#include <boost/filesystem/operations.hpp>
37
#include <boost/filesystem.hpp>
38
#include <fmt/format.h>
38
#include <fmt/format.h>
39
#include <iostream>
39
#include <iostream>
40
#include <memory>
40
#include <memory>
Lines 328-334 Link Here
328
                                        << "\" should name a file, not a directory.");
328
                                        << "\" should name a file, not a directory.");
329
            }
329
            }
330
330
331
            if (!serverGlobalParams.logAppend && boost::filesystem::is_regular(absoluteLogpath)) {
331
            if (!serverGlobalParams.logAppend && boost::filesystem::is_regular_file(absoluteLogpath)) {
332
                std::string renameTarget = absoluteLogpath + "." + terseCurrentTimeForFilename();
332
                std::string renameTarget = absoluteLogpath + "." + terseCurrentTimeForFilename();
333
                boost::system::error_code ec;
333
                boost::system::error_code ec;
334
                boost::filesystem::rename(absoluteLogpath, renameTarget, ec);
334
                boost::filesystem::rename(absoluteLogpath, renameTarget, ec);
(-)mongo-r5.0.26.old/src/mongo/db/startup_warnings_mongod.cpp (+1 lines)
Lines 34-39 Link Here
34
#include "mongo/db/startup_warnings_mongod.h"
34
#include "mongo/db/startup_warnings_mongod.h"
35
35
36
#include <boost/filesystem/operations.hpp>
36
#include <boost/filesystem/operations.hpp>
37
#include <boost/filesystem/exception.hpp>
37
#include <fstream>
38
#include <fstream>
38
#ifndef _WIN32
39
#ifndef _WIN32
39
#include <sys/resource.h>
40
#include <sys/resource.h>
(-)mongo-r5.0.26.old/src/mongo/db/storage/storage_engine_lock_file_posix.cpp (-2 / +2 lines)
Lines 55-61 Link Here
55
    // if called without a fully qualified path it asserts; that makes mongoperf fail.
55
    // if called without a fully qualified path it asserts; that makes mongoperf fail.
56
    // so make a warning. need a better solution longer term.
56
    // so make a warning. need a better solution longer term.
57
    // massert(40389, str::stream() << "Couldn't find parent dir for file: " << file.string(),);
57
    // massert(40389, str::stream() << "Couldn't find parent dir for file: " << file.string(),);
58
    if (!file.has_branch_path()) {
58
    if (!file.has_parent_path()) {
59
        LOGV2(22274,
59
        LOGV2(22274,
60
              "warning flushMyDirectory couldn't find parent dir for file: {file}",
60
              "warning flushMyDirectory couldn't find parent dir for file: {file}",
61
              "flushMyDirectory couldn't find parent dir for file",
61
              "flushMyDirectory couldn't find parent dir for file",
Lines 64-70 Link Here
64
    }
64
    }
65
65
66
66
67
    boost::filesystem::path dir = file.branch_path();  // parent_path in new boosts
67
    boost::filesystem::path dir = file.parent_path();  // parent_path in new boosts
68
68
69
    LOGV2_DEBUG(22275, 1, "flushing directory {dir_string}", "dir_string"_attr = dir.string());
69
    LOGV2_DEBUG(22275, 1, "flushing directory {dir_string}", "dir_string"_attr = dir.string());
70
70
(-)mongo-r5.0.26.old/src/mongo/db/storage/storage_engine_metadata.cpp (-2 / +2 lines)
Lines 220-226 Link Here
220
    // if called without a fully qualified path it asserts; that makes mongoperf fail.
220
    // if called without a fully qualified path it asserts; that makes mongoperf fail.
221
    // so make a warning. need a better solution longer term.
221
    // so make a warning. need a better solution longer term.
222
    // massert(13652, str::stream() << "Couldn't find parent dir for file: " << file.string(),);
222
    // massert(13652, str::stream() << "Couldn't find parent dir for file: " << file.string(),);
223
    if (!file.has_branch_path()) {
223
    if (!file.has_parent_path()) {
224
        LOGV2(22283,
224
        LOGV2(22283,
225
              "warning flushMyDirectory couldn't find parent dir for file: {file}",
225
              "warning flushMyDirectory couldn't find parent dir for file: {file}",
226
              "flushMyDirectory couldn't find parent dir for file",
226
              "flushMyDirectory couldn't find parent dir for file",
Lines 229-235 Link Here
229
    }
229
    }
230
230
231
231
232
    boost::filesystem::path dir = file.branch_path();  // parent_path in new boosts
232
    boost::filesystem::path dir = file.parent_path();  // parent_path in new boosts
233
233
234
    LOGV2_DEBUG(22284, 1, "flushing directory {dir_string}", "dir_string"_attr = dir.string());
234
    LOGV2_DEBUG(22284, 1, "flushing directory {dir_string}", "dir_string"_attr = dir.string());
235
235
(-)mongo-r5.0.26.old/src/mongo/scripting/engine.cpp (+1 lines)
Lines 35-40 Link Here
35
35
36
#include <algorithm>
36
#include <algorithm>
37
#include <boost/filesystem/operations.hpp>
37
#include <boost/filesystem/operations.hpp>
38
#include <boost/filesystem/directory.hpp>
38
39
39
#include "mongo/base/string_data.h"
40
#include "mongo/base/string_data.h"
40
#include "mongo/client/dbclient_base.h"
41
#include "mongo/client/dbclient_base.h"
(-)mongo-r5.0.26.old/src/mongo/shell/shell_utils_launcher.cpp (-6 / +7 lines)
Lines 39-44 Link Here
39
#include <boost/iostreams/stream.hpp>
39
#include <boost/iostreams/stream.hpp>
40
#include <boost/iostreams/stream_buffer.hpp>
40
#include <boost/iostreams/stream_buffer.hpp>
41
#include <boost/iostreams/tee.hpp>
41
#include <boost/iostreams/tee.hpp>
42
#include <boost/filesystem.hpp>
42
#include <fcntl.h>
43
#include <fcntl.h>
43
#include <fmt/format.h>
44
#include <fmt/format.h>
44
#include <iostream>
45
#include <iostream>
Lines 947-972 Link Here
947
    boost::filesystem::directory_iterator i(from);
948
    boost::filesystem::directory_iterator i(from);
948
    while (i != end) {
949
    while (i != end) {
949
        boost::filesystem::path p = *i;
950
        boost::filesystem::path p = *i;
950
        if (p.leaf() == "metrics.interim" || p.leaf() == "metrics.interim.temp") {
951
        if (p.filename() == "metrics.interim" || p.filename() == "metrics.interim.temp") {
951
            // Ignore any errors for metrics.interim* files as these may disappear during copy
952
            // Ignore any errors for metrics.interim* files as these may disappear during copy
952
            boost::system::error_code ec;
953
            boost::system::error_code ec;
953
            boost::filesystem::copy_file(p, to / p.leaf(), ec);
954
            boost::filesystem::copy_file(p, to / p.filename(), ec);
954
            if (ec) {
955
            if (ec) {
955
                LOGV2_INFO(22814,
956
                LOGV2_INFO(22814,
956
                           "Skipping copying of file from '{from}' to "
957
                           "Skipping copying of file from '{from}' to "
957
                           "'{to}' due to: {error}",
958
                           "'{to}' due to: {error}",
958
                           "Skipping copying of file due to error"
959
                           "Skipping copying of file due to error"
959
                           "from"_attr = p.generic_string(),
960
                           "from"_attr = p.generic_string(),
960
                           "to"_attr = (to / p.leaf()).generic_string(),
961
                           "to"_attr = (to / p.filename()).generic_string(),
961
                           "error"_attr = ec.message());
962
                           "error"_attr = ec.message());
962
            }
963
            }
963
        } else if (p.leaf() != "mongod.lock" && p.leaf() != "WiredTiger.lock") {
964
        } else if (p.filename() != "mongod.lock" && p.filename() != "WiredTiger.lock") {
964
            if (boost::filesystem::is_directory(p)) {
965
            if (boost::filesystem::is_directory(p)) {
965
                boost::filesystem::path newDir = to / p.leaf();
966
                boost::filesystem::path newDir = to / p.filename();
966
                boost::filesystem::create_directory(newDir);
967
                boost::filesystem::create_directory(newDir);
967
                copyDir(p, newDir);
968
                copyDir(p, newDir);
968
            } else {
969
            } else {
969
                boost::filesystem::copy_file(p, to / p.leaf());
970
                boost::filesystem::copy_file(p, to / p.filename());
970
            }
971
            }
971
        }
972
        }
972
        ++i;
973
        ++i;
(-)mongo-r5.0.26.old/src/mongo/shell/shell_utils_launcher.h (-1 / +1 lines)
Lines 29-35 Link Here
29
29
30
#pragma once
30
#pragma once
31
31
32
#include <boost/filesystem/convenience.hpp>
32
#include <boost/filesystem/path.hpp>
33
#include <map>
33
#include <map>
34
#include <sstream>
34
#include <sstream>
35
#include <string>
35
#include <string>

Return to bug 932251