Is it possible to ignore broken symbolic links in 'Configure filter' window?

Asked by Norbert on 2013-08-12

Hello, Zenju!

I am syncing my directories (local with NFS share) with FreeFileSync. I set 'Symbolic link handling' to 'Follow'.

On NFS share I have a symbolic link which is broken while syncing (it points to file, which is not shared by NFS).
In this conditions I get 'Error' window with text
"Cannot resolve symbolic link '/media/VAIO/some_symbolic_link'.

Error Code 2: No such file or directory"
I press 'Ignore', and get sync tables.

I tried to add symbolic link path ( /media/VAIO/some_symbolic_link ) to 'Exclude' section of 'Configure filter' window. But during next sync with this saved config I get an Error window again.

So my question is: is it possible to ignore broken symbolic links in 'Configure filter' window?

Question information

Language:
English Edit question
Status:
Solved
For:
FreeFileSync Edit question
Assignee:
No assignee Edit question
Solved by:
Norbert
Solved:
2013-09-25
Last query:
2013-09-25
Last reply:
2013-09-25
Zenju (zenju) said : #1

You can use the filter to exclude individual items.

Norbert (nrbrtx) said : #2

I know. I use filter window for doing so.

I tried to set full filepath to broken link, only its file name, full filepath of link target, filename of link target.

It seems that symbolic links are not maintained by 'Configure filter' window. Can you verify this?

I apt-getted source of FreeFileSync 5.16 on Ubuntu Precise and it seems that error message is created in /zen/file_traverser.cpp in DirTraverser class in line # 585.

Zenju (zenju) said : #3

You need to use a relative filter phrase. See the help for details.

Norbert (nrbrtx) said : #4

May be I can't understand something.
Let me show the problem step-by-step:
1. Launch gnome-terminal or konsole
2. cd /tmp
3. mkdir source; mkdir target
4. ln -s /broken_link source/link
5. FreeFileSync source/ target/
6. Set 'Comparison Settings' -> 'Symbolic Link handling' to 'Follow', press 'Compare'/F5
7. Error window pop-ups with text "Cannot resolve symbolic link '/home/norbert/source/link'.

Error Code 2: No such file or directory".
8. In 'Exclude' section of 'Configure filter' window set rule '/link', press 'OK'.
9. Press 'Compare'/F5 and Error window popups again.

Can you execute this short list and report a result?

If I set 'Comparison Settings' -> 'Symbolic Link handling' to 'Direct', press 'Compare'/F5
I see no file named 'link' in comparison results.

Norbert (nrbrtx) said : #5

Sorry, In 7 the error message is "Cannot resolve symbolic link '/tmp/source/link'.

Error Code 2: No such file or directory"

Zenju (zenju) said : #6

Ah, thanks to your description I was able to reproduce the problem: In the case of symlinks the filter should also be checked before trying to resolve them, and not only after resolution when it falls back to the usual file/dir handling. I've added this check for the next version.
Thanks for your report!

Norbert (nrbrtx) said : #7

Thank you, Zenju!
I hope that this fix will be available for Ubuntu Precise (12.04 LTS) version of FreeFileSync too.

Norbert (nrbrtx) said : #8

It seems that this problem exists in FFS 5.21.

Zenju (zenju) said : #9

What problem do you mean? Excluding broken symbolic links via filters when symlink handling is set to "follow" should work in 5.21.

Norbert (nrbrtx) said : #10

I mean that my testing method, which is described in #4 produce the same error.
Can you test it again?

Zenju (zenju) said : #11

It works for me: I don't get an error for the broken symlink once it is excluded.

Norbert (nrbrtx) said : #12

Thank you for answer, Zenju.

How do you exclude broken symlink?

Zenju (zenju) said : #13

By placing "/link" into the exclude filter box following your description.

Norbert (nrbrtx) said : #14

Oh.
I forgot to add it to exclude filter.
It really works.

Problem solved!