Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
I
inary
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
1
Konular (issue)
1
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
SulinOS
inary
Commits
84ec972f
Unverified
Kaydet (Commit)
84ec972f
authored
May 18, 2020
tarafından
Suleyman Poyraz
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Sade Fark
Merge branch 'patch-41838' into patch-41837
Fixed archive problems.
üst
623ae7b3
dda9f780
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
35 deletions
+6
-35
archive.py
inary/archive.py
+6
-9
command.py
inary/cli/command.py
+0
-26
No files found.
inary/archive.py
Dosyayı görüntüle @
84ec972f
...
@@ -733,10 +733,9 @@ class ArchiveZip(ArchiveBase):
...
@@ -733,10 +733,9 @@ class ArchiveZip(ArchiveBase):
if
is_dir
:
# this is a directory
if
is_dir
:
# this is a directory
if
not
os
.
path
.
isdir
(
ofile
):
if
not
os
.
path
.
isdir
(
ofile
):
os
.
makedirs
(
ofile
)
os
.
makedirs
(
ofile
)
perm
=
info
.
external_attr
perm
=
info
.
external_attr
>>
16
perm
&=
0xFFFF0000
if
perm
==
0
:
perm
>>=
16
perm
=
33261
# octets of -rwxr-xr-x
perm
|=
0x00000100
os
.
chmod
(
ofile
,
perm
)
os
.
chmod
(
ofile
,
perm
)
continue
continue
...
@@ -756,11 +755,9 @@ class ArchiveZip(ArchiveBase):
...
@@ -756,11 +755,9 @@ class ArchiveZip(ArchiveBase):
target
=
self
.
zip_obj
.
read
(
info
.
filename
)
target
=
self
.
zip_obj
.
read
(
info
.
filename
)
os
.
symlink
(
target
,
ofile
)
os
.
symlink
(
target
,
ofile
)
else
:
else
:
perm
=
info
.
external_attr
perm
=
info
.
external_attr
>>
16
perm
&=
0x08FF0000
if
perm
==
0
:
perm
>>=
16
perm
=
33261
# -rwxr-xr-x
perm
|=
0x00000100
info
.
filename
=
outpath
info
.
filename
=
outpath
self
.
zip_obj
.
extract
(
info
,
target_dir
)
self
.
zip_obj
.
extract
(
info
,
target_dir
)
os
.
chmod
(
ofile
,
perm
)
os
.
chmod
(
ofile
,
perm
)
...
...
inary/cli/command.py
Dosyayı görüntüle @
84ec972f
...
@@ -128,8 +128,6 @@ class Command(object):
...
@@ -128,8 +128,6 @@ class Command(object):
pass
pass
def
process_opts
(
self
):
def
process_opts
(
self
):
self
.
check_auth_info
()
# make destdir absolute
# make destdir absolute
if
self
.
options
.
destdir
:
if
self
.
options
.
destdir
:
d
=
str
(
self
.
options
.
destdir
)
d
=
str
(
self
.
options
.
destdir
)
...
@@ -138,32 +136,8 @@ class Command(object):
...
@@ -138,32 +136,8 @@ class Command(object):
os
.
makedirs
(
d
)
os
.
makedirs
(
d
)
self
.
options
.
destdir
=
os
.
path
.
realpath
(
d
)
self
.
options
.
destdir
=
os
.
path
.
realpath
(
d
)
def
check_auth_info
(
self
):
username
=
self
.
options
.
username
password
=
self
.
options
.
password
# TODO: We'll get the username, password pair from a configuration
# file from users home directory. Currently we need user to
# give it from the user interface.
# if not username and not password:
# if someauthconfig.username and someauthconfig.password:
# self.authInfo = (someauthconfig.username,
# someauthconfig.password)
# return
if
username
and
password
:
self
.
options
.
authinfo
=
(
username
,
password
)
return
if
username
and
not
password
:
from
getpass
import
getpass
password
=
getpass
(
_
(
"Password: "
))
self
.
options
.
authinfo
=
(
username
,
password
)
else
:
self
.
options
.
authinfo
=
None
def
init
(
self
,
database
=
True
,
write
=
True
,
locked
=
False
):
def
init
(
self
,
database
=
True
,
write
=
True
,
locked
=
False
):
"""initialize INARY components"""
"""initialize INARY components"""
if
self
.
options
:
if
self
.
options
:
ui
=
inary
.
cli
.
CLI
(
self
.
options
.
debug
,
self
.
options
.
verbose
)
ui
=
inary
.
cli
.
CLI
(
self
.
options
.
debug
,
self
.
options
.
verbose
)
else
:
else
:
...
...
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