Changeset 2126


Ignore:
Timestamp:
05/15/10 12:34:09 (4 years ago)
Author:
lowjoel
Message:

When creating the command line, check all paths to ensure that the last character is not a \, otherwise we need to escape it (otherwise the command line is garbled)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/eraser/Eraser.Shell/CtxMenu.cpp

    r2121 r2126  
    556556            } 
    557557 
     558            if (*DragDropDestinationDirectory.rbegin() == '\\') 
     559                DragDropDestinationDirectory += '\\'; 
    558560            commandLine += L"\"/destination=" + DragDropDestinationDirectory + L"\""; 
    559561            break; 
     
    562564            { 
    563565                //Set the destination for the paste operation. 
     566                if (*DragDropDestinationDirectory.rbegin() == '\\') 
     567                    DragDropDestinationDirectory += '\\'; 
    564568                commandLine += L"\"/destination=" + DragDropDestinationDirectory + L"\""; 
    565569 
     
    592596            i != SelectedFiles.end(); ++i) 
    593597        { 
    594             commandLine += L"\"" + *i + L"\" "; 
     598            std::wstring path(*i); 
     599            if (path[path.length() - 1] == '\\') 
     600                path += '\\'; 
     601            commandLine += L" \"" + path + L"\""; 
    595602        } 
    596603 
     
    10321039                finalParameters).c_str()); 
    10331040 
     1041            MessageBox(NULL, &buffer.front(), L"", MB_OK); 
    10341042            if (!CreateProcess(NULL, &buffer.front(), NULL, NULL, true, CREATE_NO_WINDOW, 
    10351043                NULL, NULL, &startupInfo, &processInfo)) 
Note: See TracChangeset for help on using the changeset viewer.