Skip to content

Conversation

reubes
Copy link

@reubes reubes commented Jun 22, 2021

check available destination space before copy

check available destination space before copy
#include <cstdio>
#include <cstdint>

#include <filesystem>
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that has created many problems before, gotta souround all of it with #ifdef __linux__

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks, no real programming experience so forgive my terrible coding...

@reubes reubes marked this pull request as draft June 23, 2021 11:51
uint64_t copy_file(const std::string& src_path, const std::string& dst_path)
{
#ifdef __linux__
int plotsize = 109000000000
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

are you sure that number fits into an int lol
you need uint64_t here

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

make it const uint64_t too

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes I was wondering about that! I guess it would be better to get the real size value but just put a rough value for now

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's not a constant anyways, all good

reubes added 4 commits June 23, 2021 21:15
add room for alternate destination directory
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants