Skip to content

Commit

Permalink
Correct zip/gz extension
Browse files Browse the repository at this point in the history
  • Loading branch information
grauser committed Jan 12, 2017
1 parent 98cfb2e commit 070c6f9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Cloud/FileStore.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ RideFile *
FileStore::uncompressRide(QByteArray *data, QString name, QStringList &errors)
{
// make sure its named as we expect
if (!name.endsWith(".json.zip")) {
if (!name.endsWith(".json.zip") && !name.endsWith(".json.gz")) {
errors << tr("expected compressed activity file.");
return NULL;
}
Expand Down Expand Up @@ -1297,7 +1297,7 @@ FileStoreSyncDialog::uploadNext()
store->compressRide(ride, data, QFileInfo(curr->text(1)).baseName() + ".json");
delete ride; // clean up!

store->writeFile(data, QFileInfo(curr->text(1)).baseName() + ".json.zip");
store->writeFile(data, QFileInfo(curr->text(1)).baseName() + (store->useZip?".json.zip":".json.gz"));
QApplication::processEvents();
return true;

Expand Down

0 comments on commit 070c6f9

Please sign in to comment.