VirtualBox

Ignore:
Timestamp:
Apr 30, 2015 2:27:39 PM (10 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
99923
Message:

DnD: Rollback handling, bugfixes, cleanup.

Location:
trunk/src/VBox/GuestHost/DragAndDrop
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/GuestHost/DragAndDrop/DnDURIList.cpp

    r55512 r55556  
    8282    m_cbTotal += cbSize;
    8383#ifdef DEBUG_andy
    84     LogFlowFunc(("strSrcPath=%s, strDstPath=%s, fMode=0x%x, cbSize=%RU64, cbTotal=%zu\n",
    85                  pcszPath, &pcszPath[cbBaseLen], objInfo.Attr.fMode, cbSize, m_cbTotal));
    86 #endif
    87 
    88     PRTDIR hDir;
     84    LogFlowFunc(("strSrcPath=%s, strDstPath=%s, fMode=0x%x, cbSize=%RU64, cTotal=%RU32, cbTotal=%zu\n",
     85                 pcszPath, &pcszPath[cbBaseLen], objInfo.Attr.fMode, cbSize, m_cTotal, m_cbTotal));
     86#endif
     87
    8988    /* We have to try to open even symlinks, cause they could
    9089     * be symlinks to directories. */
     90    PRTDIR hDir;
    9191    rc = RTDirOpen(&hDir, pcszPath);
     92
    9293    /* The following error happens when this was a symlink
    93      * to an file or a regular file. */
     94     * to a file or a regular file. */
    9495    if (   rc == VERR_PATH_NOT_FOUND
    9596        || rc == VERR_NOT_A_DIRECTORY)
     
    150151                                                      pszNewFile, &pszNewFile[cbBaseLen],
    151152                                                      objInfo1.Attr.fMode, cbSize));
     153                        m_cTotal++;
    152154                        m_cbTotal += cbSize;
     155#ifdef DEBUG_andy
     156                        LogFlowFunc(("strSrcPath=%s, strDstPath=%s, fMode=0x%x, cbSize=%RU64, cTotal=%RU32, cbTotal=%zu\n",
     157                                     pszNewFile, &pszNewFile[cbBaseLen], objInfo1.Attr.fMode, cbSize, m_cTotal, m_cbTotal));
     158#endif
    153159                    }
    154160                    else /* Handle symlink directories. */
    155161                        rc = appendPathRecursive(pszNewFile, cbBaseLen, fFlags);
    156 #ifdef DEBUG_andy
    157                     LogFlowFunc(("strSrcPath=%s, strDstPath=%s, fMode=0x%x, cbSize=%RU64, cbTotal=%zu\n",
    158                                  pszNewFile, &pszNewFile[cbBaseLen], objInfo1.Attr.fMode, cbSize, m_cbTotal));
    159 #endif
     162
    160163                    RTStrFree(pszNewFile);
    161164                }
     
    166169
    167170            default:
     171                /* Just ignore the rest. */
    168172                break;
    169173        }
  • trunk/src/VBox/GuestHost/DragAndDrop/DnDURIObject.cpp

    r55549 r55556  
    3737DnDURIObject::DnDURIObject(void)
    3838    : m_Type(Unknown)
    39     , m_fMode(0)
     39    , m_fCreationMode(0)
    4040    , m_cbSize(0)
    4141    , m_cbProcessed(0)
     
    5151    , m_strSrcPath(strSrcPath)
    5252    , m_strTgtPath(strDstPath)
    53     , m_fMode(fMode)
     53    , m_fCreationMode(fMode)
    5454    , m_cbSize(cbSize)
    5555    , m_cbProcessed(0)
     
    199199                        rc = RTFileGetSize(u.m_hFile, &m_cbSize);
    200200                    if (RT_SUCCESS(rc))
     201                    {
     202                        LogFlowFunc(("cbSize=%RU64, fMode=%RU32\n", m_cbSize, m_fCreationMode));
    201203                        m_cbProcessed = 0;
     204                    }
    202205                }
    203206                else
     
    345348    Close();
    346349
    347     m_Type        = Unknown;
    348     m_strSrcPath  = "";
    349     m_strTgtPath  = "";
    350     m_fMode      = 0;
    351     m_cbSize      = 0;
    352     m_cbProcessed = 0;
     350    m_Type          = Unknown;
     351    m_strSrcPath    = "";
     352    m_strTgtPath    = "";
     353    m_fCreationMode = 0;
     354    m_cbSize        = 0;
     355    m_cbProcessed   = 0;
    353356}
    354357
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette