Unable to upload during ftp

tomotomo - July 6, 2009 - 17:47
Project:Plugin Manager
Version:6.x-1.9
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:active
Description

Trying to install content_taxonomy I get:

A drupal install was automatically located on ftp at public_html/xxx/sites/all/modules.
Unable to upload content_taxonomy
Unable to install content_taxonomy

so ftp_put($connect, "$ftp_path/$file", $extract_dir . $file, FTP_BINARY) failed. mkdir succeeds, so does extraction and deletion. I can see the list of extracted files. Maybe it's because it tries to upload a whole directory.

#1

tomotomo - July 6, 2009 - 19:11

Among other things, here's the main fix that finally made it work:

--- ftp.backend.inc@revision=1.3.2.21&pathrev=DRUPAL-6--1-9     2009-07-07 02:00
:19.976000000 +0700
+++ ftp.backend.inc     2009-07-07 02:07:55.249000000 +0700
@@ -143,7 +143,7 @@
   // Process each of the files.
   foreach ($files AS $index => $file) {
     ftp_chdir($connect, "/");
-    if (trim($file, "\\/") != $file) {
+    if (is_dir($extract_dir . $file)) {
       if (!@ftp_mkdir($connect, "$ftp_path/$file") && !@ftp_chdir($connect, "$f
tp_path/$file")) {
         drupal_set_message(t("Unable to create directory @file", array('@file'
=> $file)), 'error');
         return FALSE;

AttachmentSize
ftp.backend.inc_.patch 582 bytes
 
 

Drupal is a registered trademark of Dries Buytaert.