Skip to content
Browse files

fixed: unable to open symlinked directory over FTP (fixes #12541)

  • Loading branch information...
1 parent 4faa412 commit 23a17dbd308b14bf5537d5343a846f3614968c24 @mkortstiege mkortstiege committed
Showing with 12 additions and 0 deletions.
  1. +12 −0 xbmc/filesystem/FTPParse.cpp
View
12 xbmc/filesystem/FTPParse.cpp
@@ -415,7 +415,13 @@ int CFTPParse::FTPParse(string str)
if (pcrecpp::RE("-").FullMatch(type))
m_flagtryretr = 1;
if (pcrecpp::RE("l").FullMatch(type))
+ {
m_flagtrycwd = m_flagtryretr = 1;
+ // handle symlink
+ size_t found = m_name.find(" -> ");
+ if (found != std::string::npos)
+ m_name = m_name.substr(0, found);
+ }
setTime(date);
return 1;
@@ -441,7 +447,13 @@ int CFTPParse::FTPParse(string str)
if (pcrecpp::RE("-").FullMatch(type))
m_flagtryretr = 1;
if (pcrecpp::RE("l").FullMatch(type))
+ {
m_flagtrycwd = m_flagtryretr = 1;
+ // handle symlink
+ size_t found = m_name.find(" -> ");
+ if (found != std::string::npos)
+ m_name = m_name.substr(0, found);
+ }
setTime(date);
return 1;

0 comments on commit 23a17db

Please sign in to comment.
Something went wrong with that request. Please try again.