---------------------------------------------------------------------------
| 111 | } |
| 112 | //--------------------------------------------------------------------------- |
| 113 | String TStorageFile::GetNewRotationName(void) |
| 114 | { |
| 115 | String f = rotation_name; |
| 116 | try |
| 117 | { |
| 118 | for(int i=1, l=f.Length(); i<=l; i++) |
| 119 | { |
| 120 | if( f[i] == '{' ) |
| 121 | { |
| 122 | // find '}' |
| 123 | for(int j=i+1; j<=l; j++) |
| 124 | { |
| 125 | if( f[j] == '}' ) |
| 126 | { |
| 127 | String mask = f.SubString(i+1, j-i-1); |
| 128 | String r = FormatDateTime(mask, Now()); |
| 129 | f.Delete(i, j-i+1); |
| 130 | f.Insert(r, i); |
| 131 | l = f.Length(); |
| 132 | i += r.Length() - 1; |
| 133 | break; |
| 134 | } |
| 135 | } |
| 136 | } |
| 137 | } |
| 138 | } |
| 139 | catch(...) |
| 140 | { |
| 141 | WriteToLogError("GetNewRotationName error"); |
| 142 | } |
| 143 | if( f.Length() > 0 && ExtractFilePath(f).Length() == 0 ) |
| 144 | return WorkDir + f; |
| 145 | return f; |
| 146 | } |
| 147 | //--------------------------------------------------------------------------- |
| 148 | bool TStorageFile::IsNeedRenameAfterRotate(void) |
| 149 | { |
nothing calls this directly
no test coverage detected