| 105 | } |
| 106 | |
| 107 | void TPathSplitStore::AppendComponent(const TStringBuf comp) { |
| 108 | if (!comp || comp == TStringBuf(".")) { |
| 109 | // ignore |
| 110 | } else if (comp == TStringBuf("..") && !empty() && back() != TStringBuf("..")) { |
| 111 | pop_back(); |
| 112 | } else { |
| 113 | // push back first .. also |
| 114 | push_back(comp); |
| 115 | } |
| 116 | } |
| 117 | |
| 118 | TStringBuf TPathSplitStore::Extension() const { |
| 119 | return size() > 0 ? CutExtension(back()) : TStringBuf(); |
no test coverage detected