Problem nextcloud.log getting clogged after trying to copy a google drive mounted folder out of google drive

Nextcloud version : 13.0.5.2
Operating system and version : Debian Jessie
Apache or nginx version : Nginx 1.13.5
PHP version : 7.0.31-1

The issue I am facing:

nextcloud.log file is getting huge very quickly , even though I tried to change config.php 's log level to 4 , changed to syslog , (which would only be useful for gaining time to solve the problem)

Is this the first time you’ve seen this error? (Y/N): Y

Steps to replicate it:

The problem now is autoreplicating, probable steps to reproduce are:

  1. Install and activate gdrive_files_external app
  2. Mount a google drive location oauth2 authorized which has a folder with files on it
  3. Try to copy a folder inside google drive mount outside of it

The output of your Nextcloud log in Admin > Logging:

{"reqId":"qecUfj2KAc60Yu5TOY1v","level":3,"time":"2018-09-14T19:20:49+00:00","remoteAddr":"X.X.X.X","user":"USER","app":"PHP","method":"COPY","url":"\/remote.php\/webdav\/GoogleDriveProfessor\/Economia\/Mercado-de-trabalho\/publicacoes-ardil","message":"feof() expects parameter 1 to be resource, string given at \/NEXTCLOUDFOLDER\/lib\/private\/legacy\/helper.php#296","userAgent":"Mozilla\/5.0 (X11; Linux x86_64; rv:61.0) Gecko\/20100101 Firefox\/61.0","version":"13.0.5.2"}

The output of your config.php file in /path/to/nextcloud (make sure you remove any identifiable information!):

<?php
$CONFIG = array (
  'instanceid' => 'XXX',
  'passwordsalt' => 'XXX',
  'secret' => 'XXX',
  'trusted_domains' => 
  array (
    0 => ''AAA',
    1 => 'ABC',
    2 => 'DEF',
    3 => 'GHI',
  ),
  'datadirectory' => '/datafolder',
  'tempdirectory' => '/tempfolder',
  'overwrite.cli.url' => 'AAA',
  'dbtype' => 'pgsql',
  'version' => '13.0.5.2',
  'dbname' => 'nextcloudbname',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'dbuser' => 'dbUSERNEXTCLOUD',
  'dbpassword' => 'DBPASSWORD',
  'logtimezone' => 'UTC',
  'installed' => true,
  'memcache.local' => '\\OC\\Memcache\\Redis',
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'redis' => 
  array (
    'host' => 'localhost',
    'port' => 6379,
    'timeout' => 0,
  ),
  'mail_from_address' => 'ABC',
  'mail_smtpmode' => 'php',
  'mail_domain' => 'DEF',
  'appstore.experimental.enabled' => true,
  'filelocking.enabled' => true,
  'loglevel' => '4',
  'log_type' => 'syslog',
  'logfile' => '',
  'maintenance' => false,
  'theme' => '',
  'updater.release.channel' => 'beta',
  'updater.secret' => '$2y$10$tPh8v5j6zi5JZqXvxqIr2O1vKbAIsAvOYO8bS9Ha0q/2AzNW/6A/6',
);