mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-19 19:33:47 +00:00
Merge branch 'dk_copy_file' into master
This commit is contained in:
@@ -20,6 +20,7 @@
|
|||||||
#include <glob.h>
|
#include <glob.h>
|
||||||
#include <pwd.h>
|
#include <pwd.h>
|
||||||
#include <boost/filesystem.hpp>
|
#include <boost/filesystem.hpp>
|
||||||
|
#include <boost/system/error_code.hpp>
|
||||||
#include <boost/filesystem/convenience.hpp>
|
#include <boost/filesystem/convenience.hpp>
|
||||||
#include <boost/process.hpp>
|
#include <boost/process.hpp>
|
||||||
#endif
|
#endif
|
||||||
@@ -187,8 +188,9 @@ namespace search_for_drives_internal
|
|||||||
//if not same file system - could be removable drive
|
//if not same file system - could be removable drive
|
||||||
if (! compare_filesystem_id(path, parent_path)) {
|
if (! compare_filesystem_id(path, parent_path)) {
|
||||||
//free space
|
//free space
|
||||||
boost::filesystem::space_info si = boost::filesystem::space(path);
|
boost::system::error_code ec;
|
||||||
if (si.available != 0) {
|
boost::filesystem::space_info si = boost::filesystem::space(path, ec);
|
||||||
|
if (!ec && si.available != 0) {
|
||||||
//user id
|
//user id
|
||||||
struct stat buf;
|
struct stat buf;
|
||||||
stat(path.c_str(), &buf);
|
stat(path.c_str(), &buf);
|
||||||
|
|||||||
Reference in New Issue
Block a user