Skip to content

Commit 908d3ac

Browse files
committed
snapshot
1 parent f3e18fc commit 908d3ac

File tree

1 file changed

+19
-7
lines changed

1 file changed

+19
-7
lines changed

dist/r.js

Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* @license r.js 2.1.6+ Sun, 07 Jul 2013 05:44:10 GMT Copyright (c) 2010-2012, The Dojo Foundation All Rights Reserved.
2+
* @license r.js 2.1.6+ Sun, 07 Jul 2013 23:44:07 GMT Copyright (c) 2010-2012, The Dojo Foundation All Rights Reserved.
33
* Available via the MIT or new BSD license.
44
* see: http://github.com/jrburke/requirejs for details
55
*/
@@ -20,7 +20,7 @@ var requirejs, require, define, xpcUtil;
2020
(function (console, args, readFileFunc) {
2121
var fileName, env, fs, vm, path, exec, rhinoContext, dir, nodeRequire,
2222
nodeDefine, exists, reqMain, loadedOptimizedLib, existsForNode, Cc, Ci,
23-
version = '2.1.6+ Sun, 07 Jul 2013 05:44:10 GMT',
23+
version = '2.1.6+ Sun, 07 Jul 2013 23:44:07 GMT',
2424
jsSuffixRegExp = /\.js$/,
2525
commandOption = '',
2626
useLibLoaded = {},
@@ -24627,7 +24627,8 @@ define('build', function (require) {
2462724627
' correctly while running in the optimizer. Try only' +
2462824628
' using a config that is also valid JSON, or do not use' +
2462924629
' mainConfigFile and instead copy the config values needed' +
24630-
' into a build file or command line arguments given to the optimizer.');
24630+
' into a build file or command line arguments given to the optimizer.\n' +
24631+
'Source error from parsing: ' + mainConfigFile + ': ' + configError);
2463124632
}
2463224633
if (mainConfig) {
2463324634
mainConfigPath = mainConfigFile.substring(0, mainConfigFile.lastIndexOf('/'));
@@ -24722,10 +24723,21 @@ define('build', function (require) {
2472224723
' for optimization, and "dir" if you want the appDir' +
2472324724
' or baseUrl directories optimized.');
2472424725
}
24725-
if (config.dir && config.appDir && config.dir === config.appDir) {
24726-
throw new Error('"dir" and "appDir" set to the same directory.' +
24727-
' This could result in the deletion of appDir.' +
24728-
' Stopping.');
24726+
24727+
if (config.dir) {
24728+
// Make sure the output dir is not set to a parent of the
24729+
// source dir or the same dir, as it will result in source
24730+
// code deletion.
24731+
if (config.dir === config.baseUrl ||
24732+
config.dir === config.appDir ||
24733+
(config.baseUrl && build.makeRelativeFilePath(config.dir,
24734+
config.baseUrl).indexOf('..') !== 0) ||
24735+
(config.appDir &&
24736+
build.makeRelativeFilePath(config.dir, config.appDir).indexOf('..') !== 0)) {
24737+
throw new Error('"dir" is set to a parent or same directory as' +
24738+
' "appDir" or "baseUrl". This can result in' +
24739+
' the deletion of source code. Stopping.');
24740+
}
2472924741
}
2473024742

2473124743
if (config.insertRequire && !lang.isArray(config.insertRequire)) {

0 commit comments

Comments
 (0)