Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
3pia
VISPA
VISPA web
Commits
e6f8f097
Commit
e6f8f097
authored
Dec 27, 2014
by
ThorbenQuast
Browse files
editor: - .pyc not supported anymore (like it is in Sublime, gEdit,...)
- extend error message if a file cannot be read
parent
435d62be
Changes
2
Hide whitespace changes
Inline
Side-by-side
vispa/extensions/codeeditor/static/js/editor.js
View file @
e6f8f097
...
...
@@ -107,11 +107,12 @@ var CodeEditor = Emitter.extend({
var
initContent
=
function
(
res
)
{
if
(
!
res
.
success
)
{
self
.
view
.
alert
(
"
<html>An internal server error has occured. <br />
"
+
self
.
view
.
alert
(
"
<html>An internal server error has occured: <br />
"
+
""
+
res
.
error
+
"
<br />
"
+
"
<br /> The editor has been closed. </html>
"
);
self
.
view
.
close
();
}
self
.
path
=
path
;
self
.
path
=
path
;
if
(
self
.
writable
===
null
)
//only set writable if it has not been set yet
self
.
writable
=
res
.
writable
;
self
.
mtime
=
res
.
mtime
;
...
...
vispa/remote/filesystem.py
View file @
e6f8f097
...
...
@@ -422,19 +422,22 @@ class FileSystem(object):
content
=
content
.
decode
(
'utf8'
)
#new: check for writing rights
writable
=
self
.
checkPermissions
(
path
)
error
=
None
mtime
=
os
.
path
.
getmtime
(
path
)
except
Exception
as
e
:
mtime
=
0
content
=
""
writable
=
None
error
=
str
(
e
)
return
json
.
dumps
({
"content"
:
content
,
"mtime"
:
mtime
,
"success"
:
mtime
>
0
,
"watch_error"
:
watch_error
,
"writable"
:
writable
"writable"
:
writable
,
"error"
:
error
})
def
checkPermissions
(
self
,
path
):
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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