Fix possible use of double backslash in relative file path value.

svn-id: r45485
This commit is contained in:
Johannes Schickel 2009-10-28 20:56:05 +00:00
parent 5b537c3561
commit 168275be5f

View File

@ -896,8 +896,11 @@ void createProjectFile(const std::string &name, const std::string &uuid, const B
"\t<Files>\n";
std::string modulePath;
if (!moduleDir.compare(0, setup.srcDir.size(), setup.srcDir))
if (!moduleDir.compare(0, setup.srcDir.size(), setup.srcDir)) {
modulePath = moduleDir.substr(setup.srcDir.size());
if (!modulePath.empty() && modulePath.at(0) == '/')
modulePath.erase(0, 1);
}
if (modulePath.size())
addFilesToProject(moduleDir, project, includeList, excludeList, setup.filePrefix + '/' + modulePath);