aboutsummaryrefslogtreecommitdiff
path: root/src/daemon/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/daemon/main.cpp')
-rw-r--r--src/daemon/main.cpp24
1 files changed, 23 insertions, 1 deletions
diff --git a/src/daemon/main.cpp b/src/daemon/main.cpp
index 3e25636d8..f2ae6dcc3 100644
--- a/src/daemon/main.cpp
+++ b/src/daemon/main.cpp
@@ -1,4 +1,4 @@
-// Copyright (c) 2014-2019, The Monero Project
+// Copyright (c) 2014-2020, The Monero Project
//
// All rights reserved.
//
@@ -107,6 +107,20 @@ uint16_t parse_public_rpc_port(const po::variables_map &vm)
return rpc_port;
}
+#ifdef WIN32
+bool isFat32(const wchar_t* root_path)
+{
+ std::vector<wchar_t> fs(MAX_PATH + 1);
+ if (!::GetVolumeInformationW(root_path, nullptr, 0, nullptr, 0, nullptr, &fs[0], MAX_PATH))
+ {
+ MERROR("Failed to get '" << root_path << "' filesystem name. Error code: " << ::GetLastError());
+ return false;
+ }
+
+ return wcscmp(L"FAT32", &fs[0]) == 0;
+}
+#endif
+
int main(int argc, char const * argv[])
{
try {
@@ -140,6 +154,7 @@ int main(int argc, char const * argv[])
command_line::add_arg(core_settings, daemon_args::arg_public_node);
command_line::add_arg(core_settings, daemon_args::arg_zmq_rpc_bind_ip);
command_line::add_arg(core_settings, daemon_args::arg_zmq_rpc_bind_port);
+ command_line::add_arg(core_settings, daemon_args::arg_zmq_pub);
command_line::add_arg(core_settings, daemon_args::arg_zmq_rpc_disabled);
daemonizer::init_options(hidden_options, visible_options);
@@ -233,6 +248,13 @@ int main(int argc, char const * argv[])
boost::filesystem::path data_dir = boost::filesystem::absolute(
command_line::get_arg(vm, cryptonote::arg_data_dir));
+#ifdef WIN32
+ if (isFat32(data_dir.root_name().c_str()))
+ {
+ MERROR("Data directory resides on FAT32 volume that has 4GiB file size limit, blockchain might get corrupted.");
+ }
+#endif
+
// FIXME: not sure on windows implementation default, needs further review
//bf::path relative_path_base = daemonizer::get_relative_path_base(vm);
bf::path relative_path_base = data_dir;