Page 1 of 1

Find Swapped File bug

Posted: Thu Nov 26, 2015 10:10 am
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

Re: Find Swapped File bug

Posted: Thu Nov 26, 2015 11:06 am
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