+[8.50b5] Folder rename on FTP connection

Bug reports will be moved here when the described bug has been fixed

Moderators: white, Hacker, petermad, Stefan2

dabazz92
Junior Member
Junior Member
Posts: 12
Joined: 2013-10-16, 07:32 UTC

+[8.50b5] Folder rename on FTP connection

Post by *dabazz92 »

When I rename a directory on FTP server and I upload the local directory with the same name, Total Commander says the "Target already exists [file name] do you want to overwrite it?".

ex:
1. There is a "plugins" dir on FTP
2. I rename it to "plugins-old"
3. I copy new version of "plugins" from local disk
4. [overwrite warning message here]
User avatar
white
Power Member
Power Member
Posts: 4623
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Post by *white »

Not confirmed using TC 8.50b5 32bit.

Are you using 32bit or 64bit version?
Can you check a different ftp server?
Can you check if the same thing happens using a different ftp client?
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48088
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Not confirmed either. I guess that the server is returning an error. Therefore could you create and post a log of this operation, please? Configuration - Options - FTP - Log file.
Author of Total Commander
https://www.ghisler.com
dabazz92
Junior Member
Junior Member
Posts: 12
Joined: 2013-10-16, 07:32 UTC

Post by *dabazz92 »

Thanks, here is the log, I edited the domain name but the real IP is left there in case it's needed for tests.

- I am using 64bit version.
- When I use FileZilla, the problem don't occur

The FTP belongs to one of the major hosting providers in Poland - Nazwa.pl, but problem occurs also with different ones.

In case the overwrite message is not be visible in the log, I made a screenshot on URL: imgur.com/38xyVRk

Code: Select all

Connect to: (2013-10-17 09:28:06)
hostname=[SERVER-URL]
username=mywebsiteserverhere
startdir=/
[SERVER-URL]=77.55.78.101
220 FTP server ready
USER mywebsiteserverhere
331 Password required for mywebsiteserverhere
PASS ****************
230 User mywebsiteserverhere logged in
SYST
215 UNIX Type: L8
FEAT
211-Features:
 MDTM
 MFMT
 TVFS
 MFF modify;UNIX.group;UNIX.mode;
 MLST modify*;perm*;size*;type*;unique*;UNIX.group*;UNIX.mode*;UNIX.owner*;
 REST STREAM
 SIZE
211 End
OPTS UTF8 ON
500 OPTS UTF8 not understood
Connect ok!
CWD /
250 CWD command successful
PWD
257 "/" is the current directory
Get directory
TYPE A
200 Type set to A
PORT 192,168,0,138,213,226
200 PORT command successful
MLSD
150 Opening ASCII mode data connection for MLSD
Download
Waiting for server...
226 Transfer complete
CWD rss
250 CWD command successful
PWD
257 "/rss" is the current directory
Get directory
PORT 192,168,0,138,213,237
200 PORT command successful
MLSD
150 Opening ASCII mode data connection for MLSD
Download
Waiting for server...
226 Transfer complete
TYPE I
200 Type set to I
PORT 192,168,0,138,213,238
200 PORT command successful
RETR trendy.php
150 Opening BINARY mode data connection for trendy.php (1758 bytes)
Download
Waiting for server...
226 Transfer complete
Copied (2013-10-17 09:28:17): ftp://[SERVER-URL]/rss/trendy.php -> C:\rss\trendy.php 1 758 bytes, 1 kbytes/s
PORT 192,168,0,138,213,241
200 PORT command successful
RETR nowosci.php
150 Opening BINARY mode data connection for nowosci.php (1765 bytes)
Download
Waiting for server...
226 Transfer complete
Copied (2013-10-17 09:28:17): ftp://[SERVER-URL]/rss/nowosci.php -> C:\rss\nowosci.php 1 765 bytes, 114 kbytes/s
PORT 192,168,0,138,213,242
200 PORT command successful
RETR informacje_z_branzy.php
150 Opening BINARY mode data connection for informacje_z_branzy.php (1347 bytes)
Download
Waiting for server...
226 Transfer complete
Copied (2013-10-17 09:28:17): ftp://[SERVER-URL]/rss/informacje_z_branzy.php -> C:\rss\informacje_z_branzy.php 1 347 bytes, 86 kbytes/s
CWD /
250 CWD command successful
PWD
257 "/" is the current directory
RNFR rss
350 File or directory exists, ready for destination name
RNTO rss-old
250 Rename successful
Get directory
TYPE A
200 Type set to A
PORT 192,168,0,138,213,252
200 PORT command successful
MLSD
150 Opening ASCII mode data connection for MLSD
Download
Waiting for server...
226 Transfer complete
MKD rss
257 "/rss" - Directory successfully created
CWD rss
250 CWD command successful
PWD
257 "/rss" is the current directory
TYPE I
200 Type set to I
PORT 192,168,0,138,214,15
200 PORT command successful
STOR informacje_z_branzy.php
150 Opening BINARY mode data connection for informacje_z_branzy.php
Upload
226 Transfer complete
SIZE informacje_z_branzy.php
213 1347
Copied (2013-10-17 09:28:39): C:\rss\informacje_z_branzy.php -> ftp://[SERVER-URL]/rss/informacje_z_branzy.php 1 347 bytes, 28 kbytes/s
PORT 192,168,0,138,214,17
200 PORT command successful
STOR nowosci.php
150 Opening BINARY mode data connection for nowosci.php
Upload
226 Transfer complete
SIZE nowosci.php
213 1765
Copied (2013-10-17 09:28:40): C:\rss\nowosci.php -> ftp://[SERVER-URL]/rss/nowosci.php 1 765 bytes, 114 kbytes/s
PORT 192,168,0,138,214,19
200 PORT command successful
STOR trendy.php
150 Opening BINARY mode data connection for trendy.php
Upload
226 Transfer complete
SIZE trendy.php
213 1758
Copied (2013-10-17 09:28:41): C:\rss\trendy.php -> ftp://[SERVER-URL]/rss/trendy.php 1 758 bytes, 54 kbytes/s
CWD /
250 CWD command successful
PWD
257 "/" is the current directory
Get directory
TYPE A
200 Type set to A
PORT 192,168,0,138,214,20
200 PORT command successful
MLSD
150 Opening ASCII mode data connection for MLSD
Download
Waiting for server...
226 Transfer complete
QUIT
221 Goodbye.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48088
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

I cannot see any errors - according to the log, directory rss is successfully renamed to rss-old, a new rss is created, and files informacje_z_branzy.php, nowosci.php and trendy.php.

When exactly do you get this error?
Author of Total Commander
https://www.ghisler.com
dabazz92
Junior Member
Junior Member
Posts: 12
Joined: 2013-10-16, 07:32 UTC

Post by *dabazz92 »

Maybe the log don't register overwrite dialog popups?

It happens after I rename remote dir (there should be some files inside) and I use F5 [Enter] on the dir in local disk pane. Then, before the copy starts, I get the message saying the target file already exists.

It feels like some cache of FTP contents is not refreshed after rename and TC assumes the contents are still there.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48088
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

No, the cache is updated/cleared. But you can check easily whether it's the cache or not. Open wcx_ftp.ini, then look for the section belonging to this ftp connection. There, add the line
CacheDirs=0
Author of Total Commander
https://www.ghisler.com
dabazz92
Junior Member
Junior Member
Posts: 12
Joined: 2013-10-16, 07:32 UTC

Post by *dabazz92 »

Yay, with CacheDirs=0 entry for the connection, it works perfectly!

So, if renaming could clear whole or only affected part of cache and leave the rest, it would be perfect :)
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48088
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

OK, how exactly do you rename the folder? It seems that TC doesn't update the cache for some unknown reason in your case.
Author of Total Commander
https://www.ghisler.com
dabazz92
Junior Member
Junior Member
Posts: 12
Joined: 2013-10-16, 07:32 UTC

Post by *dabazz92 »

I am always renaming the FTP dir with Shift+F6 shortcut.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48088
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Strange, I'm using this too in my tests, and never get this error. :(
Author of Total Commander
https://www.ghisler.com
dabazz92
Junior Member
Junior Member
Posts: 12
Joined: 2013-10-16, 07:32 UTC

Post by *dabazz92 »

I just asked a friend to check on totally different PC and FTP server, app version 8.01 x64 - the same problem.

I checked my PC with x32, error too.

In every case the system is polish version of Windows 7, 64-bit.
User avatar
MarcinW
Power Member
Power Member
Posts: 852
Joined: 2012-01-23, 15:58 UTC
Location: Poland

Post by *MarcinW »

I can confirm the problem. Steps to reproduce - do exactly as described!:

1) connect to FTP,
2) create local directory "C:\123" with a file "test.bin" inside (by using only digits in "123" we are case-insensitive),
3) simply copy this directory (with its contents) to remote FTP server,
4) go into "123" on remote FTP server, so contents of this directory will be cached by TC,
5) go back to the root directory of the remote FTP server,
6) rename remote directory "123" to "1234",
7) now copy local directory "C:\123" to the remote FTP server - warning will appear, it will say that "test.bin" already exists.

So cache of TC seems to be out-of-sync with the remote FTP contents after directory renaming.
User avatar
Dalai
Power Member
Power Member
Posts: 9395
Joined: 2005-01-28, 22:17 UTC
Location: Meiningen (Südthüringen)

Post by *Dalai »

I can confirm this issue using Marcin's steps. But: only if transfer (FTP upload) is made in foreground. It doesn't happen if the files are uploaded in background.

This affects at least TC versions 8.01 and 8.5 Beta 6 (both 32 bit); don't know about TC 64 bit.

Regards
Dalai
#101164 Personal licence
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64

Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
User avatar
white
Power Member
Power Member
Posts: 4623
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Post by *white »

Confirmed. Bug introduced in TC 7.50. TC 7.04a works OK.


Might have been fixed before:

Windows Commander 3.53
24.09.98 Fixed: Rename directory on FTP server -> clear cache

Windows Commander 3.50
28.07.97 Added: FTP client now working inside Wincmd
Post Reply