summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--ranger/__main__.py20
1 files changed, 10 insertions, 10 deletions
diff --git a/ranger/__main__.py b/ranger/__main__.py
index aa0785e3..9c97e190 100644
--- a/ranger/__main__.py
+++ b/ranger/__main__.py
@@ -62,17 +62,17 @@ def parse_arguments():
 	if arg.cd_after_exit:
 		sys.stderr = sys.__stdout__
 
-	try:
-		os.makedirs(arg.confdir)
-	except OSError as err:
-		if err.errno != 17:  # 17 means it already exists
-			print("This configuration directory could not be created:")
-			print(arg.confdir)
-			print("To run ranger without the need for configuration files")
-			print("use the --clean option (not implemented yet)")
-			raise SystemExit()
-
 	if not arg.clean:
+		try:
+			os.makedirs(arg.confdir)
+		except OSError as err:
+			if err.errno != 17:  # 17 means it already exists
+				print("This configuration directory could not be created:")
+				print(arg.confdir)
+				print("To run ranger without the need for configuration files")
+				print("use the --clean option.")
+				raise SystemExit()
+
 		sys.path.append(arg.confdir)
 
 	return arg
5 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167