Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
genotoul-bioinfo
ng6
Commits
1184f821
Commit
1184f821
authored
Nov 12, 2020
by
Romain Therville
🐭
Browse files
Merge branch 'issue#190' into 'dev'
Merge branch Issue#190 with master See merge request
!109
parents
a398dbee
5a90f603
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/ng6/analysis.py
View file @
1184f821
...
...
@@ -752,12 +752,14 @@ class Analysis (Component):
return
[
retcode
,
str_cmd
]
def
get_web_filepath
(
self
,
file_name
,
base_filepath
=
'fileadmin'
):
curr_dir
=
self
.
directory
#If analysis already exists, retrieve directory from db (need for migration step, to get the real destination directory)
if
self
.
id
!=
None
:
t3mysql
=
t3MySQLdb
()
curr_dir
=
t3mysql
.
select_analysis_directory
(
str
(
self
.
id
))
return
base_filepath
+
os
.
path
.
join
(
curr_dir
,
file_name
)
def
get_web_filepath
(
self
,
file_name
,
base_filepath
=
'fileadmin'
):
"""
returns the full web filepath from a given filename
@param file_name : the path to the file to link
@param base_filepath : the first directory in the path (depends on the server's directory structure)
@return : the full web filepath
"""
return
base_filepath
+
os
.
path
.
join
(
self
.
get_directory
(),
file_name
)
ui/nG6/lib/class.tx_nG6_utils.php
View file @
1184f821
...
...
@@ -160,7 +160,8 @@ class tx_nG6_utils {
return
0
;
}
$stream
=
ssh2_exec
(
$connection
,
'find '
.
$directory
.
' -maxdepth 1 -not -name "*.html" -not -name "*.png" -type f -exec rm -f {} \;'
);
#Exclusion of the log files from the purge process
$stream
=
ssh2_exec
(
$connection
,
'find '
.
$directory
.
' -maxdepth 1 -not -name "*.html" -not -name "*.png" -not -name "*.log" -not -name "*.log.gz" -not -name "*.pdf" -not -name "md5sum.txt" -not -name "*GXB02039*" -not -name "*PCT0078*" -type f -exec rm -f {} \;'
);
$errorStream
=
ssh2_fetch_stream
(
$stream
,
SSH2_STREAM_STDERR
);
// Enable blocking for both streams
stream_set_blocking
(
$errorStream
,
true
);
...
...
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