mirror of
https://github.com/9001/copyparty.git
synced 2026-02-22 10:23:30 +10: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
|
continue
|
||||||
|
|
||||||
p = os.path.normpath(p)
|
p = os.path.normpath(p)
|
||||||
if os.path.isdir(p) and os.listdir(p):
|
mkdir = not os.path.isdir(p)
|
||||||
mkdir = False
|
if mkdir:
|
||||||
else:
|
|
||||||
mkdir = True
|
|
||||||
os.mkdir(p)
|
os.mkdir(p)
|
||||||
|
|
||||||
p = os.path.join(p, "copyparty")
|
p = os.path.join(p, "copyparty")
|
||||||
if not os.path.isdir(p):
|
try:
|
||||||
|
os.listdir(p)
|
||||||
|
except:
|
||||||
os.mkdir(p)
|
os.mkdir(p)
|
||||||
|
|
||||||
if npath > 1:
|
if npath > 1:
|
||||||
|
|||||||
Reference in New Issue
Block a user