Find Swapped File bug

Discussion about CodeLite development process and patches
petah
CodeLite Expert
Posts: 231
Joined: Sat Nov 24, 2012 8:04 pm
Genuine User: Yes
IDE Question: c++
Location: Los Angeles
Contact:

Find Swapped File bug

Post by petah »

Hi Eran,

FindSwappedFile() no longer works in CL trunk, looking at the source it seems you're collection workspace files but never actually iterate over them:

Code: Select all

bool ContextCpp::FindSwappedFile(const wxFileName& rhs, wxStringSet_t& others)

(...)

// Check the workspace
        std::vector<wxFileName> files;                     // never used!
        ManagerST::Get()->GetWorkspaceFiles(files, true);

        for(size_t j = 0; j < exts.GetCount(); j++) {
            wxFileName otherFile = rhs;
            otherFile.SetExt(exts.Item(j));
            if(otherFile.FileExists()) {
                // we got a match
                others.insert(otherFile.GetFullPath());
            }
        }
For now I reverted to stable (git tag 9.0), which works fine.

thx,

-- p
main: Debian Jessie x64 + custom wxTrunk
User avatar
eranif
CodeLite Plugin
Posts: 6375
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Find Swapped File bug

Post by eranif »

It does work... only if the "swapped" file is placed in the same folder as the current one
Please open a bug

Eran
Make sure you have read the HOW TO POST thread
Post Reply