Public feed #721795

Anonymous

public text v1 · immutable
Raw Edit
·published 2007-10-01 15:28 UTC
rendered paste body
Common::String POSIXFilesystemNode::getName() const {
	if (_path == "")
		return "";
	
	if (_displayName == "") {
		const char *start = _path.c_str();
		const char *cur = start + _path.size() - 2;
	
		while (cur >= start && *cur != '/') {
			--cur;
		}
		
		_displayName = String(cur + 1);
	}
	
	return _displayName;
}