• Do not register here on develop.twiki.org, login with your twiki.org account.
• Use View topic Item7848 for generic doc work for TWiki-6.1.1. Use View topic Item7851 for doc work on extensions that are not part of a release. More... Close
• Anything you create or change in standard webs (Main, TWiki, Sandbox etc) will be automatically reverted on every SVN update.
Does this site look broken?. Use the LitterTray web for test cases.

Item4958: Plugin installer fails on directories.

Item Form Data

AppliesTo: Component: Priority: CurrentState: WaitingFor: TargetRelease ReleasedIn
Engine   Normal No Action Required   n/a 4.1.2

Edit Form Data

Reported By:
Applies To:
Current State:
Waiting For:
Target Release:
Released In:


When trying to install a plugin that creates new directories, I get this error:


Error: Failed to move file 'pub/TWiki/TinyMCEPlugin/' to /var/www/html/test-twiki/pub/TWiki/TinyMCEPlugin/: Is a directory

Software error:

Installation terminated at /var/www/html/test-twiki/lib/TWiki/Configure/UIs/EXTEND.pm line 149.

For help, please send mail to the webmaster ( svcpdcad@rtNOSPAM.ca.atitech.com), giving this error message and the time and date of the error.

The following patch fixes the issue. I'm sure the way I did it isn' t "the right way" but it's a starting point.

--- ../lib/TWiki/Configure/UIs/EXTEND.pm 2007-03-03 06:45:57.000000000 -0800
+++ /root/twiki/twiki/lib/TWiki/Configure/UIs/EXTEND.pm 2007-09-25 17:28:57.000000000 -0700
@@ -115,7 +115,7 @@
 unless ($query->param('confirm')) {
 foreach my $file (@names) {
 my $ef = $this->_findTarget($file);
 - if (-e $ef && !-d $ef) {
 + if (-e $ef && !-d $ef) {
 my $mess = "Note: Existing $file overwritten.";
 if (File::Copy::move($ef, "$ef.bak")) {
 $mess .= " Backup saved in $ef.bak";
 @@ -140,7 +140,12 @@
 next unless -e "$dir/$file";
 # Find where it is meant to go
 my $ef = $this->_findTarget($file);
 - if (-e $ef && !-d $ef && !-w $ef) {
 + if (-d "$dir/$file") {
 + if (system("mkdir -p $ef") != 0) {
 + print $this->ERROR("Failed to create directory $ef: $!");
 + die "Installation terminated";
 + }
 + } elsif (-e $ef && !-d $ef && !-w $ef) {
 print $this->ERROR("No permission to write to $ef");
 die "Installation terminated";
 } elsif (!-d $ef) {

As an aside, the WYSIWYG does strange things with the <blockquote> tags if you edit and save this topic.

-- TWiki:Main/BuckGolemon - 12 Nov 2007

Use verbatim style for embedded code.

This is already fixed in 420. Note that we don't use system calls, to try and make it as portable as possible.


Summary Plugin installer fails on directories.
ReportedBy TWiki:Main.BuckGolemon

SVN Range TWiki-4.3.0, Fri, 12 Oct 2007, build 15261
AppliesTo Engine

Priority Normal
CurrentState No Action Required


TargetRelease n/a
ReleasedIn 4.1.2
Edit | Attach | Watch | Print version | History: r3 < r2 < r1 | Backlinks | Raw View |  Raw edit | More topic actions
Topic revision: r3 - 2007-11-23 - CrawfordCurrie
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2021 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback