mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-06-26 10:54:26 +02:00
Bug - import
- Fixed bug that only allowed import of *text* if there was more than one line of it. - Fixed some whacko formatting.
This commit is contained in:
parent
1093119f40
commit
07e36e695d
1 changed files with 5 additions and 5 deletions
|
@ -114,16 +114,16 @@ static fileType determineFileType (const std::vector <std::string>& lines)
|
|||
// All done tasks begin with "x YYYY-MM-DD".
|
||||
if (lines[i].length () > 12)
|
||||
{
|
||||
if ( lines[i][0] == 'x' &&
|
||||
lines[i][1] == ' ' &&
|
||||
if (lines[i][0] == 'x' &&
|
||||
lines[i][1] == ' ' &&
|
||||
isdigit (lines[i][2]) &&
|
||||
isdigit (lines[i][3]) &&
|
||||
isdigit (lines[i][4]) &&
|
||||
isdigit (lines[i][5]) &&
|
||||
lines[i][6] == '-' &&
|
||||
lines[i][6] == '-' &&
|
||||
isdigit (lines[i][7]) &&
|
||||
isdigit (lines[i][8]) &&
|
||||
lines[i][9] == '-' &&
|
||||
lines[i][9] == '-' &&
|
||||
isdigit (lines[i][10]) &&
|
||||
isdigit (lines[i][11]))
|
||||
return todo_sh_2_0;
|
||||
|
@ -162,7 +162,7 @@ static fileType determineFileType (const std::vector <std::string>& lines)
|
|||
return csv;
|
||||
|
||||
// Looks like 'text' is the default case, if there is any data at all.
|
||||
if (lines.size () > 1)
|
||||
if (lines.size () >= 1)
|
||||
return text;
|
||||
|
||||
return not_a_clue;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue