mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Minor Python 3/encoding fix in the file manager.
This commit is contained in:
@@ -13,6 +13,7 @@ import os
|
||||
import os.path
|
||||
import random
|
||||
import string
|
||||
import sys
|
||||
import time
|
||||
from sys import platform as _platform
|
||||
|
||||
@@ -90,7 +91,8 @@ def is_folder_hidden(filepath):
|
||||
if _platform == "win32":
|
||||
try:
|
||||
attrs = ctypes.windll.kernel32.GetFileAttributesW(
|
||||
unicode(filepath))
|
||||
unicode(filepath) if sys.version_info[0] < 3 else filepath
|
||||
)
|
||||
assert attrs != -1
|
||||
result = bool(attrs & 2)
|
||||
except (AttributeError, AssertionError):
|
||||
|
||||
Reference in New Issue
Block a user