mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
protect against null-path (#8915)
Co-authored-by: Vladimir Dombrovski <vladimir.dombrovski@bso.co> Co-authored-by: Vishesh <vishesh92@gmail.com> Co-authored-by: Suresh Kumar Anaparti <sureshkumar.anaparti@gmail.com>
This commit is contained in:
parent
d4a5459a83
commit
7affbb1dac
@ -3066,7 +3066,10 @@ public class VmwareResource extends ServerResourceBase implements StoragePoolRes
|
|||||||
}
|
}
|
||||||
|
|
||||||
private String appendFileType(String path, String fileType) {
|
private String appendFileType(String path, String fileType) {
|
||||||
if (path.toLowerCase().endsWith(fileType.toLowerCase())) {
|
if (StringUtils.isBlank(path)) {
|
||||||
|
throw new CloudRuntimeException("No path given, cannot append filetype " + fileType);
|
||||||
|
}
|
||||||
|
if (fileType == null || path.toLowerCase().endsWith(fileType.toLowerCase())) {
|
||||||
return path;
|
return path;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -4,6 +4,6 @@
|
|||||||
notifempty
|
notifempty
|
||||||
maxsize 10M
|
maxsize 10M
|
||||||
postrotate
|
postrotate
|
||||||
/bin/kill -HUP `cat /var/run/rsyslog.pid 2> /dev/null` 2> /dev/null || true
|
/usr/lib/rsyslog/rsyslog-rotate
|
||||||
endscript
|
endscript
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user