You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
when using the dist target on Windows with play 2.2.0, the generated zip file has paths that include . Consequently, the zip file cannot be used on Linux, because when the paths that include a backslash are converted to files. For instance here's an extract of the output of unzip -t play-app/conf/\application.conf play-app/share/doc/api/\index.html
I think the issue comes from the line 236 of PlaySettings.scala (2.2.0 tag): confFile -> ("conf/" + confFile.getCanonicalPath.substring(confDirectoryLen))
The confDirectoryLen does not include the path separator and the substring keeps a heading backslash.
Maybe you should do the following confFile -> ("conf/" + confFile.getCanonicalPath.replace("\\","/"))
I've noticed this same issue, on a windows extract, using windows explorer it'll ask fora password when it attempts these directories (skipping it does extract all files still).
7-zip shows it as a blank directory name.
Does that just need a +1 so the substring works correctly. ie if confDirectoryLen is 4 for 'conf', and for an entry 'conf\logger.xml' that'll cause the substring to return '\logger.xml', concatenated with confFile would result in; 'conf/\logger.xml'.
@lucdew for other directories under conf/api, are they extracted ok on Linux?
Nevermind found the answer, tried changing the conf/ to conf and got (when extracted on linux)
-rwxr-xr-x 1 doswell is-staff 34620 2013-10-27 07:54 api\index.html
Removing the trailing / and using the replace seems to work. Not sure if that affects the build on a linux system.
Hi,
when using the dist target on Windows with play 2.2.0, the generated zip file has paths that include . Consequently, the zip file cannot be used on Linux, because when the paths that include a backslash are converted to files. For instance here's an extract of the output of unzip -t
play-app/conf/\application.conf play-app/share/doc/api/\index.html
I think the issue comes from the line 236 of PlaySettings.scala (2.2.0 tag):
confFile -> ("conf/" + confFile.getCanonicalPath.substring(confDirectoryLen))
The confDirectoryLen does not include the path separator and the substring keeps a heading backslash.
Maybe you should do the following
confFile -> ("conf/" + confFile.getCanonicalPath.replace("\\","/"))
Same for doc api :
docFile -> ("share/doc/api/" + docFile.getCanonicalPath.substring(docDirectoryLen).replace("\\","/"))
The text was updated successfully, but these errors were encountered: