Fix inexisting trashbin's sub-folders

This commit is contained in:
Bastien Ho 2013-05-10 11:12:42 +02:00
parent c112ac4408
commit 6082a09e62

View file

@ -39,12 +39,22 @@ class Trashbin {
$view = new \OC\Files\View('/'. $user);
if (!$view->is_dir('files_trashbin')) {
$view->mkdir('files_trashbin');
$view->mkdir('files_trashbin/files');
$view->mkdir('files_trashbin/versions');
$view->mkdir('files_trashbin/keyfiles');
$view->mkdir('files_trashbin/share-keys');
}
if (!$view->is_dir('files_trashbin/files')) {
$view->mkdir('files_trashbin/files');
}
if (!$view->is_dir('files_trashbin/versions')) {
$view->mkdir('files_trashbin/versions');
}
if (!$view->is_dir('files_trashbin/keyfiles')) {
$view->mkdir('files_trashbin/keyfiles');
}
if (!$view->is_dir('files_trashbin/share-keys')) {
$view->mkdir('files_trashbin/share-keys');
}
if (!$view->is_dir('files_trashbin/files')) {
$view->mkdir('files_trashbin/files');
}
$path_parts = pathinfo($file_path);
$filename = $path_parts['basename'];