Respect the WSL desktop data directory
This commit is contained in:
1 parent
fbc339f5c4
commit
77f6ace5e0
2 files changed
+9
-5
No files matched your search
@@ -125,7 +125,10 @@ def prepare(args, repo):
|
||||
|
||||
|
||||
def private_home():
|
||||
return Path.home() / ".local/share/texrra-desktop"
|
||||
data = Path(os.environ.get("XDG_DATA_HOME", ""))
|
||||
if not data.is_absolute():
|
||||
data = Path.home() / ".local/share"
|
||||
return data / "texrra-desktop"
|
||||
|
||||
|
||||
def install(package, home):
|
||||
@@ -174,7 +177,7 @@ def launch(args):
|
||||
try:
|
||||
fcntl.flock(lock, fcntl.LOCK_EX | fcntl.LOCK_NB)
|
||||
except BlockingIOError as error:
|
||||
raise ValueError("The Texrra desktop backend is already running in this Fedora account") from error
|
||||
raise ValueError("The Texrra desktop backend is already running for this WSL data directory") from error
|
||||
for name in ("projects", "state"):
|
||||
(home / name).mkdir(mode=0o700, exist_ok=True)
|
||||
bundle = install(Path(__file__).resolve().parent, home)
|
||||
|
||||
Reference in new issue
Block a user