lib/u3d/installer.rb in u3d-1.0.2 vs lib/u3d/installer.rb in u3d-1.0.3
- old
+ new
@@ -19,10 +19,11 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
## --- END LICENSE BLOCK ---
require 'u3d/utils'
+require 'u3d_core/core_ext/string'
require 'u3d/installation'
require 'fileutils'
require 'file-tail'
module U3d
@@ -227,11 +228,11 @@
parent = File.expand_path('..', source_path)
new_path = File.join(parent, UNITY_DIR % unity.version)
source_path.tr!('/', '\\')
new_path.tr!('/', '\\')
- source_path = "\"" + source_path + "\"" if source_path =~ / /
- new_path = "\"" + new_path + "\"" if new_path =~ / /
+ source_path = source_path.argescape
+ new_path = new_path.argescape
command = "move #{source_path} #{new_path}"
CommonInstaller.sanitize_install(source_path, new_path, command, dry_run: dry_run)
end