Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
P
provision
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Custom Issue Tracker
Custom Issue Tracker
Labels
Merge Requests
1
Merge Requests
1
Requirements
Requirements
List
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Analytics
Analytics
Code Review
Insights
Issue
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
project
provision
Commits
08985285
Commit
08985285
authored
Nov 28, 2008
by
anarcat
Committed by
anarcat
Nov 28, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix octal modes display
backport from d5 (forgotten back then)
parent
87095dd7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
provision.path.inc
provision.path.inc
+4
-2
No files found.
provision.path.inc
View file @
08985285
...
...
@@ -79,6 +79,9 @@ function provision_path($op, $path, $confirm = TRUE, $succeed_message = NULL, $f
$value
=
$func
(
$path
,
$confirm
,
$reason
);
if
(
$op
==
'chmod'
)
{
$confirm
=
sprintf
(
'%o'
,
$confirm
);
# convert octal to string representation
}
clearstatcache
();
// this needs to be called, otherwise we get the old info
$tokens
=
array
(
"@path"
=>
$path
,
"@op"
=>
$op
,
"@confirm"
=>
$confirm
);
if
(
$reason
)
{
...
...
@@ -158,11 +161,10 @@ function provision_path_unlink($path) {
function
provision_path_chmod
(
$path
,
&
$perms
,
&
$reason
)
{
if
(
!
chmod
(
$path
,
$perms
))
{
$reason
=
t
(
'chmod to @perm failed on @path'
,
array
(
'@perm'
=>
$perms
,
'@path'
=>
$path
));
$reason
=
t
(
'chmod to @perm failed on @path'
,
array
(
'@perm'
=>
sprintf
(
'%o'
,
$perms
)
,
'@path'
=>
$path
));
return
false
;
}
clearstatcache
();
// this needs to be called, otherwise we get the old info
$perms
=
sprintf
(
'%o'
,
$perms
);
# needs to be reset to oct
$value
=
substr
(
sprintf
(
'%o'
,
fileperms
(
$path
)),
-
4
);
return
$value
;
}
...
...
Write
Preview
Markdown
is supported
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