It looks like upstream has rewritten a bunch of that code. Near as I can tell their rewrite addresses the issue. -- [Dapper] Gedit fails to save to remote location if creating new file while using sftp https://launchpad.net/bugs/39024