-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixing bug : Check item type when found folder sequence #62
Conversation
@@ -30,6 +30,7 @@ def setUp(): | |||
|
|||
# create sym link | |||
os.symlink(os.path.join(root_path, "plop.txt"), os.path.join(root_path, "plop_sym_link.txt")) | |||
os.symlink(os.path.join(root_path, "dir1"), os.path.join(root_path, "dir2")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could this line be removed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes i will remove it
- 2 hard links (. and ..) | ||
- sizes | ||
""" | ||
print("testFolderLinkStat:") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could these print be removed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes i will remove it
|
||
def testLinkType(): | ||
""" | ||
Check stats of a synbolic link folder. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you update this doc? Something like:
"""
Check the type of the items found.
"""
|
||
# create sym link | ||
os.symlink(os.path.join(root_path, "plop.txt"), os.path.join(root_path, "plop_sym_link.txt")) | ||
os.symlink(os.path.join(root_path, "dir1"), os.path.join(root_path, "dir2")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do you think to rename dir2 to dir1_sym_link?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The aim is to test the browse method when folder sequence detected
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oups yes you are right: so the name dir2 is important.
@@ -154,7 +154,7 @@ std::vector<Item> browse( | |||
// It's a sequence of directories, so it's not a sequence. | |||
BOOST_FOREACH( Time t, s.getFramesIterable() ) | |||
{ | |||
output.push_back( Item( eTypeFolder, directory / s.getFilenameAt(t) ) ); | |||
output.push_back( Item( getTypeFromPath(directory / s.getFilenameAt(t)), directory / s.getFilenameAt(t) ) ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can create a variable for directory / s.getFilenameAt(t)
.
@@ -154,14 +154,16 @@ std::vector<Item> browse( | |||
// It's a sequence of directories, so it's not a sequence. | |||
BOOST_FOREACH( Time t, s.getFramesIterable() ) | |||
{ | |||
output.push_back( Item( getTypeFromPath(directory / s.getFilenameAt(t)), directory / s.getFilenameAt(t) ) ); | |||
boost::filesystem::path folderPath = directory / s.getFilenameAt(t); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#61