瀏覽代碼

HUE-4366 [metastore] Avoid lowercasing non-S3 paths in create table wizard

Jenny Kim 9 年之前
父節點
當前提交
00751855a1
共有 1 個文件被更改,包括 3 次插入3 次删除
  1. 3 3
      apps/beeswax/src/beeswax/forms.py

+ 3 - 3
apps/beeswax/src/beeswax/forms.py

@@ -329,9 +329,9 @@ class CreateByImportFileForm(forms.Form):
     return _clean_tablename(self.db, self.cleaned_data['name'])
 
   def clean_path(self):
-    path = self.cleaned_data['path'].lower()
-    if path.startswith(S3_ROOT):
-      path = path.replace(S3_ROOT, S3A_ROOT)
+    path = self.cleaned_data['path']
+    if path.lower().startswith(S3_ROOT):
+      path = path.lower().replace(S3_ROOT, S3A_ROOT)
     if not path.endswith('/'):
       path = '%s/' % path
     return path