Skip to content

Commit

Permalink
added condition to check if images directory exists
Browse files Browse the repository at this point in the history
  • Loading branch information
Srikanth-AD committed Jun 30, 2015
1 parent 78395c1 commit 525905b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions app/Http/Controllers/PodcastController.php
Expand Up @@ -63,8 +63,10 @@ public function settings() {
*/
public function add() {

// create "images" directory under "public" directory
File::makeDirectory(public_path() . '/images');
// create "images" directory under "public" directory if it doesn't exist
if (!File::exists(public_path() . '/images')) {
File::makeDirectory(public_path() . '/images');
}

if (Request::get('feed_url')) {
$feed = Feeds::make(Request::get('feed_url'));
Expand Down

0 comments on commit 525905b

Please sign in to comment.