title: Magento getting An error has occured while syncronizing media storages. when I try synchronize media to database
body: <p>Seeing this error in exceptions.log </p>
  
  <pre><code>&gt; Next exception 'Zend_Db_Statement_Exception' with message 'INSERT INTO
  &gt;    `core_directory_storage` (`name`, `path`, `upload_time`,
  &gt;    `parent_id`) VALUES (?, ?, '2015-06-15 09:25:48', ?)
  &gt; SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry
  &gt;    'O-1395' for key 'UNQ_CORE_DIRECTORY_STORAGE_NAME_PARENT_ID'' in
  &gt;    /srv/magento/lib/Zend/Db/Statement/Pdo.php:234
  </code></pre>
  
  <p>I have truncated both core_storage_directory and core_storage_files but it seems to keep having this issue.</p>