[Question] Can WinSCP handle Junction directory?
I am using C++/CLI to program a SFTP program using WinSCP .NET assembly (version 5.5.3). My program reads in a schedule file. Originally the source path for get file has to be absolute path. Now that I have to support relative path, I encounter a problem.
Following is to try to get all text files in the home directory. Of course, I want to get all text files within all sub directories inside home directory as well. So I use:
transferOptionObject->FileMask = "*.txt";
transferResult = sftpSession->GetFiles(".", "C:\\temp\\receive", false,
transferOptionObject);
Suppose we use this account terry to log in the remote computer, the remote home directory is /C/Users/terry/Documents
. From the session->DebugLog
file, I find out WinSCP tries to go over all files and directories within the home directory.
The list is:
* a.txt
* firstDirectory
* My Music
* My Photos
* My Videso
* OtherDirectory
* Other.txt
WinSCP goes over each item in the list. After processing firstDirectory
, it tries to process My Music
. However it returns an error as not able to process because of Permission Denied.
I then go to the server, and do a dir
. I find out those 3 'My' directories are [Junction] as:
29-Apr-14 09:44 <DIR> .
29-Apr-14 09:44 <DIR> ..
16-Jan-14 09:48 <DIR> Documents
16-Jan-14 09:45 <JUNCTION> My Music [C:\Users\terry\Music]
16-Jan-14 09:45 <JUNCTION> My Pictures [C:\Users\terry\Pictures]
16-Jan-14 09:45 <JUNCTION> My Videos [C:\Users\terry\Videos]
I go over these and find out these: Topic "Sync is broken" ;; Tracker Bug 1132 ;; Topic: "WinSCP doesn't check hardlink target date when synchronizing"
Are they related?