I'm using a shared file system (NFS / Samba) that is used by both Linux and Windows clients.
Like many Linux file systems, it has soft (symbolik) links to files and directories.
The correct behavior for deleting (or copying) such soft links is to delete (or copy) the link itself and not the actual file or dirctory pointed by the link.
The same behaviour of the UNIX command:
rm -fr <dir-names>
or
rm -fr <file-names>
It's very common that soft links point to other mounts and/or higher up the directory tree.
Deleting soft links like normal directories is extremely dangerous. The user is not always aware of exact directory structures.
Not having the option to delete or copy files on NFS is very crippling.
I'm using:
TC 7.04a
Window XP Pro SP3 fully patched
NFS access via Linux Samba servers.
Deletion of symbolic links on NFS / Samba bug
Moderators: Hacker, petermad, Stefan2, white
- ghisler(Author)
- Site Admin
- Posts: 50383
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Total Commander handles links on NTFS drives correctly. Apparently Samba links cannot be detected this way, so TC sees them as normal files/folders. I don't think that there is any way to detect Samba links from Windows (or is there?), so all I can recommend is that you don't use any - you would see the same problem in Explorer too...
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
Explorer is behaving similar to TC in this sense, it even displays an error which TC doesn't, but files are still deleted.
Sadly, I must use soft links (at work) so I need a workaround.
Is it possible for TC to call 'delete file' on network directories first as if they were files:
* Success -> this was a soft link
* Fail -> probably directory, delete directory like before.
Sadly, I must use soft links (at work) so I need a workaround.
Is it possible for TC to call 'delete file' on network directories first as if they were files:
* Success -> this was a soft link
* Fail -> probably directory, delete directory like before.
- ghisler(Author)
- Site Admin
- Posts: 50383
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Well, that's EXACTLY what Total Commander already does! It tries to remove the directory, then verifies via FindFirstFile whether it's still there (some servers report success although they fail to delete the directory). If this happens, TC reports an error and offers to delete the contents of the non-empty directory.
Maybe your server still lists the directory even after the remove call, and deletes it with a longer delay? I don't currently see how to avoid that situation because the return value of the directory delete function is unreliable too...
Maybe your server still lists the directory even after the remove call, and deletes it with a longer delay? I don't currently see how to avoid that situation because the return value of the directory delete function is unreliable too...
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com