修订版 | 06fb6dcc777c54c72ced5945e26b6542c35c9296 (tree) |
---|---|
时间 | 2017-05-01 14:05:48 |
作者 | Tatsuki Sugiura <sugi@nemu...> |
Commiter | Tatsuki Sugiura |
Runnable on win32 environment.
@@ -70,7 +70,7 @@ module OSDN | ||
70 | 70 | logger.error "Invalid ownership of credential file #{credential_path}, skip loading." |
71 | 71 | return |
72 | 72 | end |
73 | - unless (stat.mode & 0777).to_s(8) == "600" | |
73 | + if RUBY_PLATFORM !~ /mswin|msys|mingw|cygwin|bccwin|wince|emc/ && (stat.mode & 0777).to_s(8) != "600" | |
74 | 74 | logger.error "Invalid permission #{(stat.mode & 0777).to_s(8)} of credential file #{credential_path}, skip loading." |
75 | 75 | return |
76 | 76 | end |
@@ -42,7 +42,7 @@ module OSDN; module CLI; module Command | ||
42 | 42 | end |
43 | 43 | case RUBY_PLATFORM |
44 | 44 | when /mswin|msys|mingw|cygwin|bccwin|wince|emc/ |
45 | - exec("start #{url}") if fork.nil? | |
45 | + spawn("start #{url.gsub(/&/, '^&')}") | |
46 | 46 | when /darwin|mac os/ |
47 | 47 | exec("/usr/bin/open", url) if fork.nil? |
48 | 48 | end |