bi hetaa olmuş, çağlar'a kahvaltı ısmarlayacağım.
This commit is contained in:
@@ -59,15 +59,15 @@ def echo(destionationFile, content):
|
|||||||
|
|
||||||
def chmod(filePath, mode = 0755):
|
def chmod(filePath, mode = 0755):
|
||||||
'''change the mode of filePath to the mode'''
|
'''change the mode of filePath to the mode'''
|
||||||
for filePath in glob.glob(filePath):
|
for fileName in glob.glob(filePath):
|
||||||
if can_access_file(filePath):
|
if can_access_file(fileName):
|
||||||
try:
|
try:
|
||||||
os.chmod(filePath, mode)
|
os.chmod(fileName, mode)
|
||||||
except OSError:
|
except OSError:
|
||||||
ctx.ui.error(_('ActionsAPI [chmod]: Operation not permitted: %s (mode: %s)') \
|
ctx.ui.error(_('ActionsAPI [chmod]: Operation not permitted: %s (mode: %s)') \
|
||||||
% (filePath, mode))
|
% (fileName, mode))
|
||||||
else:
|
else:
|
||||||
ctx.ui.error(_('ActionsAPI [chmod]: File %s doesn\'t exists.') % (filePath))
|
ctx.ui.error(_('ActionsAPI [chmod]: File %s doesn\'t exists.') % (fileName))
|
||||||
|
|
||||||
def chown(filePath, uid = "root", gid = "root"):
|
def chown(filePath, uid = "root", gid = "root"):
|
||||||
'''change the owner and group id of filePath to uid and gid'''
|
'''change the owner and group id of filePath to uid and gid'''
|
||||||
|
|||||||
Reference in New Issue
Block a user