Skip to content
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

No More Angry Jessie #69

Merged
merged 2 commits into from Jul 29, 2014
Merged

No More Angry Jessie #69

merged 2 commits into from Jul 29, 2014

Conversation

mbklein
Copy link
Member

@mbklein mbklein commented Jul 29, 2014

Address @Jeck's comments from #68

@@ -12,6 +12,10 @@ def initialize(id, location, name, size, mtime, container, type=nil)
@type = type || @container ? 'application/x-directory' : Rack::Mime.mime_type(File.extname(name))
end

def is_relative_path?
name =~ /^\.\.?$/
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This only matches the strings "." and "..". It does not match "../foo". Is that correct?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right. There is never a case where a driver would generate the path ../foo. In fact, it should never generate .. We included .. as a way to navigate back up the tree when the UI was a single-directory view. Now that it's a tree, it's no longer needed. But I left it in the drivers in case we establish a custom view-switching thing later.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

may I suggest the name of the method be changed to is_relative_parent_path? or similar?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/is_// since the '?' on the end already implies a boolean.

@jcoyne
Copy link
Member

jcoyne commented Jul 29, 2014

An angry @jcoyne enters the room!

jcoyne added a commit that referenced this pull request Jul 29, 2014
@jcoyne jcoyne merged commit 07cc692 into master Jul 29, 2014
@jcoyne jcoyne deleted the make-jessie-happy branch July 29, 2014 19:42
@mbklein
Copy link
Member Author

mbklein commented Jul 29, 2014

:squirrel:

@mjgiarlo
Copy link
Member

@jkeck would have responded but he's busy at Candlestick:

brian-wilson-10-21-12

@mbklein
Copy link
Member Author

mbklein commented Jul 29, 2014

👌

@jcoyne
Copy link
Member

jcoyne commented Jul 29, 2014

LMFAO

@mjgiarlo
Copy link
Member

😆

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants