Browse Source

Empty feature fails to clear .trash (#2916)

Jira: CDPD-41667
Mahesh Balakrishnan 3 years ago
parent
commit
c257a67f58
1 changed files with 3 additions and 2 deletions
  1. 3 2
      desktop/core/src/desktop/lib/fs/proxyfs.py

+ 3 - 2
desktop/core/src/desktop/lib/fs/proxyfs.py

@@ -81,7 +81,8 @@ class ProxyFS(object):
         return True
       user = rewrite_user(User.objects.get(username=self.getuser()))
       return user.is_authenticated and user.is_active and \
-        (is_admin(user) or not filebrowser_action or user.has_hue_permission(action=filebrowser_action, app="filebrowser") or RAZ.IS_ENABLED.get())
+        (is_admin(user) or not filebrowser_action or
+         user.has_hue_permission(action=filebrowser_action, app="filebrowser") or RAZ.IS_ENABLED.get())
 
     except User.DoesNotExist:
       LOG.exception('proxyfs.has_access()')
@@ -217,7 +218,7 @@ class ProxyFS(object):
     return fs.mktemp(subdir=subdir, prefix=prefix, basedir=basedir)
 
   def purge_trash(self):
-    fs = self._get_fs()  # Only webhdfs supports trash.
+    fs = self._get_fs(None)  # Only webhdfs supports trash.
     if fs and hasattr(fs, 'purge_trash'):
       fs.purge_trash()