mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-08-28 13:37:20 +02:00
Bug #442 - "task edit" fails on Cygwin when using a Windows editor
- Made a partial fix that at least allows any editor to be launched, and that can then locate the file. - Not addressed is the fact that some launchable Windows editors need Windows line encodings, and other are flexible.
This commit is contained in:
parent
a306892509
commit
3ae5b6ddc5
1 changed files with 3 additions and 1 deletions
|
@ -530,10 +530,12 @@ void editFile (Task& task)
|
|||
|
||||
// Create a temp file name in data.location.
|
||||
std::stringstream file;
|
||||
file << location.data << "/task." << getpid () << "." << task.id << ".task";
|
||||
file << "task." << getpid () << "." << task.id << ".task";
|
||||
std::string path = location.data + "/" + file.str ();
|
||||
|
||||
// Format the contents, T -> text, write to a file.
|
||||
std::string before = formatTask (task);
|
||||
chdir (location.data.c_str ());
|
||||
File::write (file.str (), before);
|
||||
|
||||
// Determine correct editor: .taskrc:editor > $VISUAL > $EDITOR > vi
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue