Subversion Repositories tpanel

Rev

Rev 157 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 157 Rev 245
Line 377... Line 377...
377
{
377
{
378
    DECL_TRACER("TDirectory::drop(const string &path)");
378
    DECL_TRACER("TDirectory::drop(const string &path)");
379
 
379
 
380
    try
380
    try
381
    {
381
    {
382
        int n = fs::remove_all(path);
382
        int n = (int)fs::remove_all(path);
383
        MSG_TRACE("Deleted " << n << " objects.");
383
        MSG_TRACE("Deleted " << n << " objects.");
384
        return true;
384
        return true;
385
    }
385
    }
386
    catch (std::exception& e)
386
    catch (std::exception& e)
387
    {
387
    {
Line 405... Line 405...
405
    DECL_TRACER("TDirectory::dropDir(const string& path)");
405
    DECL_TRACER("TDirectory::dropDir(const string& path)");
406
 
406
 
407
    if (path.empty())
407
    if (path.empty())
408
        return 0;
408
        return 0;
409
 
409
 
-
 
410
    if (!fs::exists(path))
-
 
411
    {
-
 
412
        MSG_WARNING("Directory \"" << path << "\" does not exist!");
-
 
413
        return 0;
-
 
414
    }
-
 
415
    
-
 
416
    MSG_DEBUG("Dropping directory: " << path);
410
    int count = 0;
417
    int count = 0;
411
 
418
 
412
    try
419
    try
413
    {
420
    {
414
        for(auto& p: fs::directory_iterator(path))
421
        for(auto& p: fs::directory_iterator(path))