Vfs widget - error handling so it doesn't fail and take down the app if file is weird

This commit is contained in:
nathangray 2018-01-15 11:53:38 -07:00
parent 8a8b8864fc
commit f6ae17c0d3

View File

@ -200,7 +200,13 @@ var et2_vfsName = (function(){ "use strict"; return et2_textbox.extend(
{
_value = _value.path;
}
_value = egw.decodePath(_value);
try
{
_value = egw.decodePath(_value);
} catch (e)
{
_value = 'Error! ' + _value;
}
this._super.apply(this,[_value]);
},
getValue: function() {
@ -230,7 +236,13 @@ var et2_vfsName_ro = (function(){ "use strict"; return et2_textbox_ro.extend(
{
_value = _value.path;
}
_value = egw.decodePath(_value);
try
{
_value = egw.decodePath(_value);
} catch (e)
{
_value = 'Error! ' + _value;
}
this._super.apply(this,[_value]);
},
getValue: function() {