diff options
author | Michael Gapczynski <GapczynskiM@gmail.com> | 2011-08-17 13:47:10 -0400 |
---|---|---|
committer | Michael Gapczynski <GapczynskiM@gmail.com> | 2011-08-17 13:47:10 -0400 |
commit | 9ee4fcdf2f5fb4ee0b1e309da9a32e5ffc72cf26 (patch) | |
tree | b6166bfda115f4322ac278cdb74b399d85e20d7a /apps/files_sharing | |
parent | 592569737495233a0018e6aff6869fc328b8a142 (diff) | |
download | nextcloud-server-9ee4fcdf2f5fb4ee0b1e309da9a32e5ffc72cf26.tar.gz nextcloud-server-9ee4fcdf2f5fb4ee0b1e309da9a32e5ffc72cf26.zip |
Only show 'Shared' directory if files are shared with you
Diffstat (limited to 'apps/files_sharing')
-rw-r--r-- | apps/files_sharing/sharedstorage.php | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/apps/files_sharing/sharedstorage.php b/apps/files_sharing/sharedstorage.php index 03385d649cb..8eea740a9e5 100644 --- a/apps/files_sharing/sharedstorage.php +++ b/apps/files_sharing/sharedstorage.php @@ -32,8 +32,10 @@ class OC_Filestorage_Shared extends OC_Filestorage { public function __construct($arguments) { $this->datadir = $arguments['datadir']; - if (!OC_Filesystem::is_dir($this->datadir)) { + if (OC_Share::getItemsInFolder($this->datadir) && !OC_Filesystem::is_dir($this->datadir)) { OC_Filesystem::mkdir($this->datadir); + } else if (OC_Filesystem::is_dir($this->datadir)) { + OC_Filesystem::rmdir($this->datadir); } $this->datadir .= "/"; } |