mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-08-25 06:12:47 -06:00
ide: Removing stalled script files in posix
git-svn-id: svn://ultimatepp.org/upp/trunk@15665 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
82333b3d99
commit
6d5abe9fd7
3 changed files with 17 additions and 0 deletions
|
|
@ -177,6 +177,17 @@ String HostConsole = "powershell.exe";
|
|||
String HostConsole = "/usr/bin/xterm -e";
|
||||
#endif
|
||||
|
||||
#ifdef PLATFORM_POSIX
|
||||
void RemoveConsoleScripts()
|
||||
{
|
||||
FileTime tm = (GetSysTime() - 24*3600).AsFileTime();
|
||||
for(FindFile ff(ConfigFile("console-script-*")); ff; ff++) {
|
||||
if(ff.GetLastWriteTime() < tm)
|
||||
FileDelete(ff.GetPath());
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
void Host::Launch(const char *_cmdline, bool console)
|
||||
{
|
||||
String cmdline = FindCommand(exedirs, _cmdline);
|
||||
|
|
|
|||
|
|
@ -43,3 +43,7 @@ struct Host {
|
|||
private:
|
||||
bool HasPlatformFlag(const Index<String>& cfg);
|
||||
};
|
||||
|
||||
#ifdef PLATFORM_POSIX
|
||||
void RemoveConsoleScripts();
|
||||
#endif
|
||||
|
|
@ -153,6 +153,8 @@ void AppMain___()
|
|||
bool hasvars = FindFile(ConfigFile("*.var"));
|
||||
|
||||
#ifdef PLATFORM_POSIX
|
||||
RemoveConsoleScripts(); // remove old console-script files
|
||||
|
||||
String home = Environment().Get("UPP_HOME", Null);
|
||||
if(!IsNull(home))
|
||||
SetHomeDirectory(home);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue