You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@buildr.apache.org by "Tammo van Lessen (JIRA)" <ji...@apache.org> on 2010/06/29 02:04:54 UTC
[jira] Created: (BUILDR-460) ZipTask uses backslash as directory
separator under Windows
ZipTask uses backslash as directory separator under Windows
-----------------------------------------------------------
Key: BUILDR-460
URL: https://issues.apache.org/jira/browse/BUILDR-460
Project: Buildr
Issue Type: Bug
Components: Packaging
Affects Versions: 1.3.5
Reporter: Tammo van Lessen
As reported in ODE-858, the following packaging spec created a zip file with backslashes as directory separators under Windows. I believe such separators should always be slashes, no matter which operating system is used.
package(:zip, :id=>"#{id}-sources").path("#{id}-sources-#{version}").tap do |zip|
if File.exist?(".svn")
`svn status -v`.reject { |l| l[0] == ?? || l[0] == ?D || l.strip.empty? || l[0...3] == "---"}.
map { |l| l.split.last }.reject { |f| File.directory?(f) }.
each { |f| zip.include f, :as=>f }
else
zip.include Dir.pwd, :as=>"."
end
end
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Resolved: (BUILDR-460) ZipTask uses backslash as directory
separator under Windows
Posted by "Tammo van Lessen (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/BUILDR-460?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Tammo van Lessen resolved BUILDR-460.
-------------------------------------
Resolution: Invalid
Marking it invalid as it is more a problem with the provided snippet than with buildr. However, the zip spec recommends to use only forward slashes, neither rubyzip nor buildr try to ensure this. So if a string with backslashes is provided to zip.include, the backslash will be part of the zip. Perhaps a warning would be nice in this case.
> ZipTask uses backslash as directory separator under Windows
> -----------------------------------------------------------
>
> Key: BUILDR-460
> URL: https://issues.apache.org/jira/browse/BUILDR-460
> Project: Buildr
> Issue Type: Bug
> Components: Packaging
> Affects Versions: 1.3.5
> Reporter: Tammo van Lessen
>
> As reported in ODE-858, the following packaging spec created a zip file with backslashes as directory separators under Windows. I believe such separators should always be slashes, no matter which operating system is used.
> package(:zip, :id=>"#{id}-sources").path("#{id}-sources-#{version}").tap do |zip|
> if File.exist?(".svn")
> `svn status -v`.reject { |l| l[0] == ?? || l[0] == ?D || l.strip.empty? || l[0...3] == "---"}.
> map { |l| l.split.last }.reject { |f| File.directory?(f) }.
> each { |f| zip.include f, :as=>f }
> else
> zip.include Dir.pwd, :as=>"."
> end
> end
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (BUILDR-460) ZipTask uses backslash as directory
separator under Windows
Posted by "Alex Boisvert (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/BUILDR-460?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12920441#action_12920441 ]
Alex Boisvert commented on BUILDR-460:
--------------------------------------
Ok, added a warning if path in zipfile contains a backslash.
boisvert@smudge:~/svn/buildr-trunk$ svn commit -m "Add warning if path in zipfile contains backslash" lib/buildr/packaging/ziptask.rb
Sending lib/buildr/packaging/ziptask.rb
Transmitting file data .
Committed revision 1021996.
> ZipTask uses backslash as directory separator under Windows
> -----------------------------------------------------------
>
> Key: BUILDR-460
> URL: https://issues.apache.org/jira/browse/BUILDR-460
> Project: Buildr
> Issue Type: Bug
> Components: Packaging
> Affects Versions: 1.3.5
> Reporter: Tammo van Lessen
>
> As reported in ODE-858, the following packaging spec created a zip file with backslashes as directory separators under Windows. I believe such separators should always be slashes, no matter which operating system is used.
> package(:zip, :id=>"#{id}-sources").path("#{id}-sources-#{version}").tap do |zip|
> if File.exist?(".svn")
> `svn status -v`.reject { |l| l[0] == ?? || l[0] == ?D || l.strip.empty? || l[0...3] == "---"}.
> map { |l| l.split.last }.reject { |f| File.directory?(f) }.
> each { |f| zip.include f, :as=>f }
> else
> zip.include Dir.pwd, :as=>"."
> end
> end
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.