Skip to content

Commit 7604d84

Browse files
committed
also delete non managed dirs
1 parent 017b150 commit 7604d84

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

qiita_pet/handlers/cloud_handlers/file_transfer_handlers.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -289,15 +289,11 @@ def get(self, requested_filepath):
289289
"The requested file %s is not present "
290290
"in Qiita's BASE_DATA_DIR!" % filepath))
291291

292-
if is_directory(filepath):
292+
if os.path.isdir(filepath):
293293
rmtree(filepath)
294294
self.write("Deleted directory %s from BASE_DATA_DIR of QIita" %
295295
filepath)
296296
else:
297-
if os.path.isdir(filepath):
298-
raise HTTPError(403, reason=(
299-
"You requested to delete directory %s, which is not "
300-
"managed by Qiita as a directory!" % filepath))
301297
os.remove(filepath)
302298
self.write("Deleted file %s from BASE_DATA_DIR of Qiita" %
303299
filepath)

0 commit comments

Comments
 (0)