Fix local file targets when pushing to non-full-path

This commit is contained in:
Thulinma 2023-04-28 23:46:51 +02:00
parent 53d14376c3
commit d7ec340d7e
4 changed files with 46 additions and 38 deletions

View file

@ -8,6 +8,7 @@
#include "timing.h"
#include "util.h"
#include "url.h"
#include "urireader.h"
#include <errno.h> // errno, ENOENT, EEXIST
#include <iomanip>
#include <iostream>
@ -215,7 +216,7 @@ namespace Util{
/// \param outFile file descriptor which will be used to send data
/// \param append whether to open this connection in truncate or append mode
bool externalWriter(const std::string & uri, int &outFile, bool append){
HTTP::URL target(uri);
HTTP::URL target = HTTP::localURIResolver().link(uri);
// If it is a remote target, we might need to spawn an external binary
if (!target.isLocalPath()){
bool matchedProtocol = false;