mirror of
https://github.com/9001/copyparty.git
synced 2026-11-15 12:18:25 +00:00
fix using empty dir as state storage;
also supports 4111 (d--x--x--x) XDG_CONFIG_HOME
This commit is contained in:
1 parent
4c3792de07
commit
0d96786e68
1 file changed
+5
-5
@@ -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