Skip to content

Commit

Permalink
addon manager: Allow comments in _server.ign
Browse files Browse the repository at this point in the history
As whitespaces aren't allowed in filenames, '# ' is safe to use for comments
  • Loading branch information
aquileia committed Apr 8, 2015
1 parent deac951 commit 24d46b7
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/addon/manager.cpp
Expand Up @@ -279,6 +279,8 @@ static std::pair<std::vector<std::string>, std::vector<std::string> > read_ignor
while (std::getline(*stream, line)) {
utils::strip(line);
const size_t l = line.size();
// .gitignore & WML like comments
if (l == 0 || !line.compare(0,2,"# ")) continue;
if (line[l - 1] == '/') { // directory; we strip the last /
patterns.second.push_back(line.substr(0, l - 1));
} else { // file
Expand Down

0 comments on commit 24d46b7

Please sign in to comment.