Revert accidental change in previous commit.
git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1204372 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
9c2f4f634d
commit
5760d03c87
@ -149,18 +149,7 @@ public static void main(String[] args) throws Throwable {
|
|||||||
File tmpDir = new File(new Configuration().get("hadoop.tmp.dir"));
|
File tmpDir = new File(new Configuration().get("hadoop.tmp.dir"));
|
||||||
ensureDirectory(tmpDir);
|
ensureDirectory(tmpDir);
|
||||||
|
|
||||||
final File workDir;
|
final File workDir = File.createTempFile("hadoop-unjar", "", tmpDir);
|
||||||
try {
|
|
||||||
workDir = File.createTempFile("hadoop-unjar", "", tmpDir);
|
|
||||||
} catch (IOException ioe) {
|
|
||||||
// If user has insufficient perms to write to tmpDir, default
|
|
||||||
// "Permission denied" message doesn't specify a filename.
|
|
||||||
System.err.println("Error creating temp dir in hadoop.tmp.dir "
|
|
||||||
+ tmpDir + " due to " + ioe.getMessage());
|
|
||||||
System.exit(-1);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!workDir.delete()) {
|
if (!workDir.delete()) {
|
||||||
System.err.println("Delete failed for " + workDir);
|
System.err.println("Delete failed for " + workDir);
|
||||||
System.exit(-1);
|
System.exit(-1);
|
||||||
|
Loading…
Reference in New Issue
Block a user