Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
die_coolen_jungs
our_own_cloud_project
Commits
fa533e72
Commit
fa533e72
authored
Jun 20, 2016
by
Vincent Petry
Committed by
GitHub
Jun 20, 2016
Browse files
Merge pull request #25161 from owncloud/fixgetsharefolder
Make getShareFolder use given view instead of static FS
parents
e3ddbeb7
a636078e
Changes
2
Hide whitespace changes
Inline
Side-by-side
apps/files_sharing/lib/Helper.php
View file @
fa533e72
...
...
@@ -277,19 +277,23 @@ class Helper {
/**
* get default share folder
*
* @param \OC\Files\View
* @return string
*/
public
static
function
getShareFolder
()
{
public
static
function
getShareFolder
(
$view
=
null
)
{
if
(
$view
===
null
)
{
$view
=
Filesystem
::
getView
();
}
$shareFolder
=
\
OC
::
$server
->
getConfig
()
->
getSystemValue
(
'share_folder'
,
'/'
);
$shareFolder
=
Filesystem
::
normalizePath
(
$shareFolder
);
if
(
!
Filesystem
::
file_exists
(
$shareFolder
))
{
if
(
!
$view
->
file_exists
(
$shareFolder
))
{
$dir
=
''
;
$subdirs
=
explode
(
'/'
,
$shareFolder
);
foreach
(
$subdirs
as
$subdir
)
{
$dir
=
$dir
.
'/'
.
$subdir
;
if
(
!
Filesystem
::
is_dir
(
$dir
))
{
Filesystem
::
mkdir
(
$dir
);
if
(
!
$view
->
is_dir
(
$dir
))
{
$view
->
mkdir
(
$dir
);
}
}
}
...
...
apps/files_sharing/lib/SharedMount.php
View file @
fa533e72
...
...
@@ -81,7 +81,7 @@ class SharedMount extends MountPoint implements MoveableMount {
$parent
=
dirname
(
$share
->
getTarget
());
if
(
!
$this
->
recipientView
->
is_dir
(
$parent
))
{
$parent
=
Helper
::
getShareFolder
();
$parent
=
Helper
::
getShareFolder
(
$this
->
recipientView
);
}
$newMountPoint
=
$this
->
generateUniqueTarget
(
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment