Private GIT
Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
CouchPotatoServer
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
vlbox
CouchPotatoServer
Commits
4e45c94f
Commit
4e45c94f
authored
Feb 12, 2013
by
Ruud
Browse files
Options
Downloads
Patches
Plain Diff
Renamer NTFS permission fix #778
parent
0a11dc66
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
couchpotato/core/plugins/renamer/__init__.py
+10
-0
10 additions, 0 deletions
couchpotato/core/plugins/renamer/__init__.py
couchpotato/core/plugins/renamer/main.py
+2
-0
2 additions, 0 deletions
couchpotato/core/plugins/renamer/main.py
with
12 additions
and
0 deletions
couchpotato/core/plugins/renamer/__init__.py
+
10
−
0
View file @
4e45c94f
from
couchpotato.core.plugins.renamer.main
import
Renamer
import
os
def
start
():
return
Renamer
()
...
...
@@ -111,6 +112,15 @@ config = [{
'
label
'
:
'
Separator
'
,
'
description
'
:
'
Replace all the spaces with a character. Example:
"
.
"
,
"
-
"
(without quotes). Leave empty to use spaces.
'
,
},
{
'
advanced
'
:
True
,
'
name
'
:
'
ntfs_permission
'
,
'
label
'
:
'
NTFS Permission
'
,
'
type
'
:
'
bool
'
,
'
hidden
'
:
os
.
name
!=
'
nt
'
,
'
description
'
:
'
Set permission of moved files to that of destination folder (Windows NTFS only).
'
,
'
default
'
:
False
,
},
],
},
{
'
tab
'
:
'
renamer
'
,
...
...
This diff is collapsed.
Click to expand it.
couchpotato/core/plugins/renamer/main.py
+
2
−
0
View file @
4e45c94f
...
...
@@ -455,6 +455,8 @@ class Renamer(Plugin):
try
:
os
.
chmod
(
dest
,
Env
.
getPermission
(
'
file
'
))
if
os
.
name
==
'
nt
'
and
self
.
conf
(
'
ntfs_permission
'
):
os
.
popen
(
'
icacls
"'
+
dest
+
'"
* /reset /T
'
)
except
:
log
.
error
(
'
Failed setting permissions for file: %s, %s
'
,
(
dest
,
traceback
.
format_exc
(
1
)))
...
...
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