mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-06-26 10:54:26 +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");
|
||||
|
||||
// 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 ());
|
||||
++ignored; // Keep compiler quiet.
|
||||
|
||||
|
@ -713,8 +713,7 @@ ARE_THESE_REALLY_HARMFUL:
|
|||
|
||||
// Cleanup.
|
||||
File::remove (file.str ());
|
||||
ignored = chdir (current_dir);
|
||||
free (current_dir);
|
||||
ignored = chdir (current_dir.c_str ());
|
||||
return changes;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue