diff options
author | Dan Goodliffe <dan@randomdan.homeip.net> | 2016-01-31 16:08:20 +0000 |
---|---|---|
committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2016-01-31 16:13:19 +0000 |
commit | a3dde47491ba27b6720ce5558053981271aa851b (patch) | |
tree | 93930f0b530a00e6436fe62d3e7e7bbc595b383f | |
parent | Implement statfs (diff) | |
download | mythfs-a3dde47491ba27b6720ce5558053981271aa851b.tar.bz2 mythfs-a3dde47491ba27b6720ce5558053981271aa851b.tar.xz mythfs-a3dde47491ba27b6720ce5558053981271aa851b.zip |
Fix and test symlink attribute size
-rw-r--r-- | mythfs/service/inodes/symlink.cpp | 2 | ||||
-rw-r--r-- | mythfs/unittests/testMain.cpp | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/mythfs/service/inodes/symlink.cpp b/mythfs/service/inodes/symlink.cpp index 8dcc0df..5e86015 100644 --- a/mythfs/service/inodes/symlink.cpp +++ b/mythfs/service/inodes/symlink.cpp @@ -14,7 +14,7 @@ namespace MythFS { return { 0, 0, S_IRUSR | S_IRGRP | S_IROTH | S_IFLNK, - 1,"root","root",0,0,0,0,0,0,0}; + 1,"root","root",0,(Ice::Long)target.length(),0,0,0,0,0}; } std::string diff --git a/mythfs/unittests/testMain.cpp b/mythfs/unittests/testMain.cpp index a2dfabe..5641cec 100644 --- a/mythfs/unittests/testMain.cpp +++ b/mythfs/unittests/testMain.cpp @@ -92,6 +92,7 @@ BOOST_AUTO_TEST_CASE( listAll ) auto a = rv->getattr(re, "/all/1001_20151220233900.mpg"); BOOST_REQUIRE(S_ISLNK(a.mode)); + BOOST_REQUIRE_EQUAL(strlen("/var/store/mythrecordings/1001_20151220233900.mpg"), a.size); auto l = rv->readlink(re, "/all/1001_20151220233900.mpg"); BOOST_REQUIRE_EQUAL("/var/store/mythrecordings/1001_20151220233900.mpg", l); } |