Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
KazukiPrzyborowski authored Mar 1, 2018
1 parent 3983907 commit adcbbd0
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions pycatfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -379,25 +379,25 @@ def PyUnCatFile(infile, outdir=None, verbose=False):
if(verbose is True):
logging.info(listcatfiles[lcfi]['fname']);
if(listcatfiles[lcfi]['ftype']==0):
os.mkdir(listcatfiles[lcfi]['fname'], listcatfiles[lcfi]['fchmod']);
os.mkdir(listcatfiles[lcfi]['fname'], int(listcatfiles[lcfi]['fchmod'], 8));
if(hasattr(os, "chown")):
os.chown(listcatfiles[lcfi]['fname'], listcatfiles[lcfi]['fuid'], listcatfiles[lcfi]['fgid']);
os.chmod(listcatfiles[lcfi]['fname'], listcatfiles[lcfi]['fchmod']);
os.chmod(listcatfiles[lcfi]['fname'], int(listcatfiles[lcfi]['fchmod'], 8));
os.utime(listcatfiles[lcfi]['fname'], (listcatfiles[lcfi]['fatime'], listcatfiles[lcfi]['fmtime']));
if(listcatfiles[lcfi]['ftype']==1):
fpc = open(listcatfiles[lcfi]['fname'], "wb");
fpc.write(listcatfiles[lcfi]['fcontents']);
fpc.close();
if(hasattr(os, "chown")):
os.chown(listcatfiles[lcfi]['fname'], listcatfiles[lcfi]['fuid'], listcatfiles[lcfi]['fgid']);
os.chmod(listcatfiles[lcfi]['fname'], listcatfiles[lcfi]['fchmod']);
os.chmod(listcatfiles[lcfi]['fname'], int(listcatfiles[lcfi]['fchmod'], 8));
os.utime(listcatfiles[lcfi]['fname'], (listcatfiles[lcfi]['fatime'], listcatfiles[lcfi]['fmtime']));
if(listcatfiles[lcfi]['ftype']==2):
os.symlink(listcatfiles[lcfi]['flinkname'], listcatfiles[lcfi]['fname']);
if(listcatfiles[lcfi]['ftype']==3):
os.link(listcatfiles[lcfi]['flinkname'], listcatfiles[lcfi]['fname']);
if(listcatfiles[lcfi]['ftype']==6 and hasattr(os, "mkfifo")):
os.mkfifo(listcatfiles[lcfi]['fname'], listcatfiles[lcfi]['fchmod']);
os.mkfifo(listcatfiles[lcfi]['fname'], int(listcatfiles[lcfi]['fchmod'], 8));
lcfi = lcfi + 1;
return True;

Expand Down

0 comments on commit adcbbd0

Please sign in to comment.