Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
our_own_cloud_project
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
die_coolen_jungs
our_own_cloud_project
Commits
77d6d11b
Commit
77d6d11b
authored
11 years ago
by
Vincent Petry
Browse files
Options
Downloads
Plain Diff
Merge pull request #9682 from owncloud/mappedlocal-rename
Fix renaming files in the root folder of a MappedLocal storage
parents
b736864e
5a0397eb
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
lib/private/files/storage/mappedlocal.php
+17
-2
17 additions, 2 deletions
lib/private/files/storage/mappedlocal.php
with
17 additions
and
2 deletions
lib/private/files/storage/mappedlocal.php
+
17
−
2
View file @
77d6d11b
...
@@ -184,8 +184,8 @@ class MappedLocal extends \OC\Files\Storage\Common {
...
@@ -184,8 +184,8 @@ class MappedLocal extends \OC\Files\Storage\Common {
}
}
public
function
rename
(
$path1
,
$path2
)
{
public
function
rename
(
$path1
,
$path2
)
{
$srcParent
=
dirname
(
$path1
);
$srcParent
=
$this
->
dirname
(
$path1
);
$dstParent
=
dirname
(
$path2
);
$dstParent
=
$this
->
dirname
(
$path2
);
if
(
!
$this
->
isUpdatable
(
$srcParent
))
{
if
(
!
$this
->
isUpdatable
(
$srcParent
))
{
\OC_Log
::
write
(
'core'
,
'unable to rename, source directory is not writable : '
.
$srcParent
,
\OC_Log
::
ERROR
);
\OC_Log
::
write
(
'core'
,
'unable to rename, source directory is not writable : '
.
$srcParent
,
\OC_Log
::
ERROR
);
...
@@ -355,6 +355,8 @@ class MappedLocal extends \OC\Files\Storage\Common {
...
@@ -355,6 +355,8 @@ class MappedLocal extends \OC\Files\Storage\Common {
/**
/**
* @param string $path
* @param string $path
* @param bool $create
* @return string
*/
*/
private
function
buildPath
(
$path
,
$create
=
true
)
{
private
function
buildPath
(
$path
,
$create
=
true
)
{
$path
=
$this
->
stripLeading
(
$path
);
$path
=
$this
->
stripLeading
(
$path
);
...
@@ -362,6 +364,19 @@ class MappedLocal extends \OC\Files\Storage\Common {
...
@@ -362,6 +364,19 @@ class MappedLocal extends \OC\Files\Storage\Common {
return
$this
->
mapper
->
logicToPhysical
(
$fullPath
,
$create
);
return
$this
->
mapper
->
logicToPhysical
(
$fullPath
,
$create
);
}
}
/**
* @param string $path
* @return string
*/
private
function
dirName
(
$path
)
{
$path
=
dirname
(
$path
);
if
(
$path
===
'.'
)
{
return
''
;
}
else
{
return
$path
;
}
}
/**
/**
* @param string $path
* @param string $path
*/
*/
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment