# Following Index: paths are relative to: media_browser_plus
# This patch can be applied using context Tools: Patch action on respective folder.
# It uses platform neutral UTF-8 encoding and \n newlines.
# Above lines and this line are ignored by the patching process.
Index: media_browser_plus.module
--- media_browser_plus.module Base (BASE)
+++ media_browser_plus.module Locally Modified (Based On LOCAL)
@@ -2166,13 +2166,8 @@
 function media_browser_plus_construct_dir_path($term) {
   $file_default_scheme = variable_get('file_default_scheme', 'public') . ':/';
   if ($term) {
-    $parents = array_reverse(taxonomy_get_parents_all($term->tid));
-    $path = $file_default_scheme . '/';
-    if (is_array($parents) && !empty($parents)) {
-      foreach ($parents as $parent) {
-        $path .= $parent->name . '/';
-      }
-    }
+
+    $path = $file_default_scheme . '/' . drupal_get_path_alias('taxonomy/term/' . $term->tid);
     $path = str_replace('Media Root', variable_get('media_root_folder', 'media'), $path);
     $dir_path = rtrim($path, '/');
   }
