Skip to content

Commit

Permalink
remove custom relative_path_from
Browse files Browse the repository at this point in the history
  • Loading branch information
shinokaro committed May 30, 2024
1 parent 52755d4 commit dba822b
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions bin/ocran
Original file line number Diff line number Diff line change
Expand Up @@ -57,16 +57,6 @@ module Ocran
end
end

# Compute the relative path from the 'src' path (directory) to 'tgt'
# (directory or file). Return the absolute path to 'tgt' if it can't
# be reached from 'src'.
def relative_path_from(other)
other = Pathname.new(other) unless other.is_a?(Pathname)
return other if drive_letter?&.casecmp(other.drive_letter?) != 0

super
end

# Determines if 'src' is contained in 'tgt' (i.e. it is a subpath of
# 'tgt'). Both must be absolute paths and not contain '..'
def subpath?(base_directory)
Expand Down

0 comments on commit dba822b

Please sign in to comment.