Commits

Kazunori Ninomiya committed 157ed51

Change the path retrieval process.

Comments (0)

Files changed (1)

 
       case 'string':
         root = path.join(options.root, path.sep);
-        src  = src.replace(new RegExp('^' + quote(root), 'i'), '');
+        if (grunt.file.doesPathContain(root, src)) {
+          src = path.relative(root, src);
+        }
         break;
 
       default:
       grunt.log.writeln('File ' + path + ' created.');
     }
   }
-
-  function quote(str)
-  {
-    return (str + '').replace(/[\-\\\^$*+?.()|\[\]{}]/g, '\\$&');
-  }
 };