Skip to content
This repository has been archived by the owner on Jun 5, 2024. It is now read-only.

Commit

Permalink
Fix issue at 1st start when Alfred doesn't create workflow data folder
Browse files Browse the repository at this point in the history
  • Loading branch information
godbout committed Feb 28, 2017
1 parent 8c14ffd commit e5e5e92
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion commands/AlfredTime.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,13 @@ private function loadConfiguration()

private function saveConfiguration()
{
$configFile = getenv('alfred_workflow_data') . '/config.json';
$workflowDir = getenv('alfred_workflow_data');
$configFile = $workflowDir . '/config.json';

if (file_exists($workflowDir) === false) {
mkdir($workflowDir);
}

file_put_contents($configFile, json_encode($this->config, JSON_PRETTY_PRINT));
}

Expand Down

0 comments on commit e5e5e92

Please sign in to comment.