mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-08-20 04:13:07 +02:00
Directory::cwd
- Made use of Directory::cwd instead of get_current_working_dir.
This commit is contained in:
parent
2b20009b7f
commit
9a9453a57f
1 changed files with 2 additions and 3 deletions
|
@ -638,7 +638,7 @@ bool CmdEdit::editFile (Task& task)
|
||||||
dateformat = context.config.get ("dateformat");
|
dateformat = context.config.get ("dateformat");
|
||||||
|
|
||||||
// Change directory for the editor
|
// Change directory for the editor
|
||||||
char* current_dir = get_current_dir_name ();
|
std::string current_dir = Directory::cwd ();
|
||||||
int ignored = chdir (location._data.c_str ());
|
int ignored = chdir (location._data.c_str ());
|
||||||
++ignored; // Keep compiler quiet.
|
++ignored; // Keep compiler quiet.
|
||||||
|
|
||||||
|
@ -713,8 +713,7 @@ ARE_THESE_REALLY_HARMFUL:
|
||||||
|
|
||||||
// Cleanup.
|
// Cleanup.
|
||||||
File::remove (file.str ());
|
File::remove (file.str ());
|
||||||
ignored = chdir (current_dir);
|
ignored = chdir (current_dir.c_str ());
|
||||||
free (current_dir);
|
|
||||||
return changes;
|
return changes;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue