<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><meta content="text/html;charset=UTF-8" http-equiv="Content-Type"></head><body ><div style='font-size:10pt;font-family:Verdana,Arial,Helvetica,sans-serif;'><div>W/o testing it, I noticed that you have a forward slash in&nbsp;<br></div><div><br></div><div></div><br><blockquote style="border-top-color: rgb(204, 204, 204); border-left-color: rgb(204, 204, 204); border-right-color: rgb(204, 204, 204); border-bottom-color: rgb(204, 204, 204); border-top-width: 1px; border-left-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-top-style: solid; border-left-style: solid; border-right-style: solid; border-bottom-style: solid; padding-top: 7px; padding-right: 7px; padding-bottom: 7px; padding-left: 7px; background-color: rgb(245, 245, 245);"><div><div>FileDirectory slash , '*.*'') do: [ :f | self<br><br>&nbsp;   extractMember: f].' as: 'install/preamble'. &nbsp;&lt;---------------------should this be FileDirectory slash?&nbsp;</div></div></blockquote> <div><br></div><div>cheers<br></div><div><br></div><div class="zmail_extra"><div id="1"><br>---- On Thu, 22 Jan 2015 15:22:25 -0500 <b>Tim Oesterreich &lt;tim.oesterreich@student.hpi.de&gt;</b> wrote ---- <br></div><blockquote style="border-left: 1px solid #0000FF;padding-left: 6px; margin: 0 0 0 5px"><div lang="DE" link="#0563C1" vlink="#954F72"><div><p><span lang="EN-US">Hello all, </span></p><p><span lang="EN-US">&nbsp;</span></p><p><i><span lang="EN-US">|package folder|</span></i></p><p><i><span lang="EN-US">&nbsp;</span></i></p><p><i><span lang="EN-US">“Name of the Monticello-package that should be archived”</span></i></p><p><i><span lang="EN-US">package := 'SWAProject'.</span></i></p><p><i><span lang="EN-US">“Name of the resources folder in Contents/Resources/”</span></i></p><p><i><span lang="EN-US">folder := 'SWA-Resources'.</span></i></p><p><i><span lang="EN-US">&nbsp;</span></i></p><p><i><span lang="EN-US">zip := ZipArchive new.</span></i></p><p><i><span lang="EN-US">mczStream := RWBinaryOrTextStream on: (String new: 10000).</span></i></p><p><i><span lang="EN-US">workingCopy := MCWorkingCopy forPackage: (MCPackage new name: package).</span></i></p><p><i><span lang="EN-US">version := workingCopy newVersion fileOutOn: mczStream.</span></i></p><p><i><span lang="EN-US">(zip addString: mczStream contents as: package, '.mcz') desiredCompressionLevel: 0.</span></i></p><p><i><span lang="EN-US">zip addTree: Smalltalk imagePath match: [:e | e fullName startsWith:</span></i></p><p><i><span lang="EN-US">&nbsp;&nbsp;&nbsp; Smalltalk imagePath , FileDirectory slash , folder].</span></i></p><p><i><span lang="EN-US">zip addString:&nbsp; 'self fileInMonticelloZipVersionNamed: ''' , package, '.mcz''.</span></i></p><p><i><span lang="EN-US">(self membersMatching: ''' , folder , FileDirectory slash , '*.*'') do: [ :f | self</span></i></p><p><i><span lang="EN-US">&nbsp;&nbsp;&nbsp; extractMember: f].' as: 'install/preamble'.</span></i></p><p><i><span lang="EN-US">zip writeToFileNamed: package , '.sar'.</span></i></p><p><span lang="EN-US">&nbsp;</span></p><p><span lang="EN-US">This code should create a SAR-Archive from a Monticello-Package including all resources in the specified folder</span></p><p><span lang="EN-US">However it throws the error “File not in Directory: SWA-Resources#” on a Windows-System, while working fine on a Mac.</span></p><p><span lang="EN-US">It seems like there is an issue with the handling of platform-dependent directory seperators&nbsp; (\ on Windows, / on UNIX). </span></p><p><span lang="EN-US">&nbsp;</span></p><p><span lang="EN-US">Best</span></p><p><span lang="EN-US">-Tim</span></p>&nbsp;</div> <br></div></blockquote><br></div><br></div></body></html>