Browse Source

Fixes issue with paths for access check

master
sloum 3 years ago
parent
commit
f78e368ff4
  1. 4
      gab

4
gab

@ -66,10 +66,10 @@ def blocked_users():
return blockfile.read().split("\n")
def get_files(channel):
return [[x, "/home/{}/.gab{}".format(x, channel)] for x in os.listdir("/home/") if x not in blocked_users() and os.access(x, os.R_OK)]
return [[x, "/home/{}/.gab{}".format(x, channel)] for x in os.listdir("/home/") if x not in blocked_users() and os.access("/home/"+x, os.R_OK)]
def list_channels():
user_dirs = ["/home/{}".format(x) for x in os.listdir("/home/") and os.access(x, os.R_OK)]
user_dirs = ["/home/{}".format(x) for x in os.listdir("/home/") if os.access("/home/"+x, os.R_OK)]
chans = {"gab"}
chan = get_chan()
for x in user_dirs:

Loading…
Cancel
Save