mirror of
https://github.com/9001/copyparty.git
synced 2025-12-27 12:35:35 -05:00
fix using empty dir as state storage;
also supports 4111 (d--x--x--x) XDG_CONFIG_HOME
This commit is contained in:
@@ -204,14 +204,14 @@ def init_E(EE: EnvParams) -> None:
|
||||
continue
|
||||
|
||||
p = os.path.normpath(p)
|
||||
if os.path.isdir(p) and os.listdir(p):
|
||||
mkdir = False
|
||||
else:
|
||||
mkdir = True
|
||||
mkdir = not os.path.isdir(p)
|
||||
if mkdir:
|
||||
os.mkdir(p)
|
||||
|
||||
p = os.path.join(p, "copyparty")
|
||||
if not os.path.isdir(p):
|
||||
try:
|
||||
os.listdir(p)
|
||||
except:
|
||||
os.mkdir(p)
|
||||
|
||||
if npath > 1:
|
||||
|
||||
Reference in New Issue
Block a user