Permalink
Browse files

Fix for quotes within file path.

  • Loading branch information...
1 parent 6ec75de commit 9285f78ef7a14550d8147f89390295995dee62be @ryantse ryantse committed Dec 29, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 server/project.js
View
@@ -31,7 +31,7 @@ setInterval(function() {
date: (new Date()).valueOf(),
uuid: generatedUuid
})
- exec('cp -- "' + (process.cwd() + file) + '" "' + (process.cwd() + '/.nide/' + generatedUuid) + '"', function(err) {
+ exec('cp -- "' + (process.cwd() + file).replace(/[\\"']/g, '\\$&').replace(/\u0000/g, '\\0') + '" "' + (process.cwd() + '/.nide/' + generatedUuid).replace(/[\\"']/g, '\\$&').replace(/\u0000/g, '\\0') + '"', function(err) {
if (!err) {
saveVersionHistory()
}

0 comments on commit 9285f78

Please sign in to comment.