Bug 122419 - Quanta won't upload, saying: /path/to/dir is a folder but a file was expected
Summary: Quanta won't upload, saying: /path/to/dir is a folder but a file was expected
Status: RESOLVED FIXED
Alias: None
Product: quanta
Classification: Unmaintained
Component: general (show other bugs)
Version: unspecified
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: András Manţia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-02-21 13:57 UTC by MM
Modified: 2006-03-03 21:11 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
A screenshot of the upload window (40.38 KB, image/png)
2006-02-21 13:59 UTC, MM
Details

Note You need to log in before you can comment on or make changes to this bug.
Description MM 2006-02-21 13:57:59 UTC
Version:           3.5.1 (using KDE 3.5.1, Gentoo)
Compiler:          gcc version 3.3.6 (Gentoo 3.3.6, ssp-3.3.6-1.0, pie-8.7.8)
OS:                Linux (i686) release 2.6.14-gentoo-r5

I have just created a new project and imported files from an existing directory, modified something, created a new upload profile, and tried to upload.
The structure is something like this (some files omitted):

[more dirs at top level]
plugins
|-- shoutbox
|   |-- class
|   |   |-- action
|   |   |   |-- pluginshoutboxaction.class.php
|   |   |   `-- pluginshoutboxupdateconfigaction.class.php
|   |   `-- dao
|   |       `-- shoutbox.class.php
|   |-- pluginshoutbox.class.php
|   `-- templates
|       |-- shoutboxConfig.template
|       `-- shoutbox_history.template

If I right click the directory called shoutbox, and select Folder upload (or quick folder upload), it starts to upload, but immediately gives this error: "/home/palantir/progetti/plog/lifetype-1.0.3/plugins/shoutbox/class is a folder, but a file was expected." and stops.
I also notice that even if the "class" item is a directory, it has NO folder icon in the upload window: it has the + icon and it can be expanded, but no folder icon.
If I choose to quick upload an internal dir, which has no subdirs, everything is OK.
Comment 1 MM 2006-02-21 13:59:09 UTC
Created attachment 14794 [details]
A screenshot of the upload window
Comment 2 András Manţia 2006-03-03 21:11:21 UTC
SVN commit 515460 by amantia:

Add trailing slash for local directories as well. Fixes addition of local directories to the project (creates weird project error like #122419).

BUG: 122419

 M  +5 -1      qextfileinfo.cpp  


--- branches/KDE/3.5/kdewebdev/lib/qextfileinfo.cpp #515459:515460
@@ -336,9 +336,13 @@
   QDir d(startPath, mask);
   QStringList l = d.entryList();
   QStringList::ConstIterator end = l.constEnd();
+  QString path;
   for (QStringList::ConstIterator it = l.constBegin(); it != end; ++it)
   {
-    list.append(KURL::fromPathOrURL(startPath + "/" + (*it)));
+    path = startPath + "/" + (*it);
+    if (QFileInfo(path).isDir())
+      path.append("/");
+    list.append(KURL::fromPathOrURL(path));
   }
   l = d.entryList("*", QDir::Dirs);
   end = l.constEnd();