mirror of
https://github.com/9001/copyparty.git
synced 2025-09-28 12:42:26 -06:00
fix using empty dir as state storage;
also supports 4111 (d--x--x--x) XDG_CONFIG_HOME
This commit is contained in:
parent
4c3792de07
commit
0d96786e68
|
@ -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:
|
||||
|
|
Loading…
Reference in a new issue