mirror of
https://github.com/abraunegg/onedrive
synced 2024-06-03 14:32:24 +02:00
support path with tilde
This commit is contained in:
parent
2d50e43674
commit
74fadfb262
|
@ -1,5 +1,5 @@
|
||||||
import core.time, core.thread;
|
import core.time, core.thread;
|
||||||
import std.getopt, std.file, std.process, std.stdio;
|
import std.getopt, std.file, std.path, std.process, std.stdio;
|
||||||
import config, itemdb, monitor, onedrive, sync;
|
import config, itemdb, monitor, onedrive, sync;
|
||||||
|
|
||||||
string ver = "1.0";
|
string ver = "1.0";
|
||||||
|
@ -24,8 +24,7 @@ void main(string[] args)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
string homeDirName = environment["HOME"];
|
string configDirName = expandTilde(environment.get("XDG_CONFIG_HOME", "~/.config")) ~ "/onedrive";
|
||||||
string configDirName = environment.get("XDG_CONFIG_HOME", homeDirName ~ "/.config") ~ "/onedrive";
|
|
||||||
string configFilePath = configDirName ~ "/config";
|
string configFilePath = configDirName ~ "/config";
|
||||||
string refreshTokenFilePath = configDirName ~ "/refresh_token";
|
string refreshTokenFilePath = configDirName ~ "/refresh_token";
|
||||||
string statusTokenFilePath = configDirName ~ "/status_token";
|
string statusTokenFilePath = configDirName ~ "/status_token";
|
||||||
|
@ -69,7 +68,7 @@ void main(string[] args)
|
||||||
// swallow exception
|
// swallow exception
|
||||||
}
|
}
|
||||||
|
|
||||||
string syncDir = cfg.get("sync_dir");
|
string syncDir = expandTilde(cfg.get("sync_dir"));
|
||||||
chdir(syncDir);
|
chdir(syncDir);
|
||||||
sync.applyDifferences();
|
sync.applyDifferences();
|
||||||
sync.scanForDifferences(".");
|
sync.scanForDifferences(".");
|
||||||
|
|
Loading…
Reference in a new issue