mirror of
https://github.com/GothenburgBitFactory/timewarrior.git
synced 2025-07-07 20:06:39 +02:00
Database: Fixed bug that mis-compared data file names
This commit is contained in:
parent
e1bac52c68
commit
35f54b64e1
1 changed files with 2 additions and 1 deletions
|
@ -185,10 +185,11 @@ unsigned int Database::getDatafile (int year, int month)
|
|||
<< std::setw (2) << std::setfill ('0') << month
|
||||
<< ".data";
|
||||
auto name = file.str ();
|
||||
auto basename = File (name).name ();
|
||||
|
||||
// If the datafile is already initialized, return.
|
||||
for (unsigned int i = 0; i < _files.size (); ++i)
|
||||
if (_files[i].name () == name)
|
||||
if (_files[i].name () == basename)
|
||||
return i;
|
||||
|
||||
// Create the Datafile. New files need the set of current exclusions.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue