Gitweb links:
...log
http://git.netsurf-browser.org/netsurf.git/shortlog/fa87f197c214620b00bc0...
...commit
http://git.netsurf-browser.org/netsurf.git/commit/fa87f197c214620b00bc07c...
...tree
http://git.netsurf-browser.org/netsurf.git/tree/fa87f197c214620b00bc07c38...
The branch, master has been updated
via fa87f197c214620b00bc07c38034b38efa638210 (commit)
via 7733ece4724d164f31e3be337ed09022f97d1d0e (commit)
from 709a23aa340c483a9c6e8f9213b098b1835a057a (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commitdiff
http://git.netsurf-browser.org/netsurf.git/commit/?id=fa87f197c214620b00b...
commit fa87f197c214620b00bc07c38034b38efa638210
Author: Chris Young <chris(a)unsatisfactorysoftware.co.uk>
Commit: Chris Young <chris(a)unsatisfactorysoftware.co.uk>
Abort if we're on a write-protected volume
Partial fix for 2397
diff --git a/amiga/gui.c b/amiga/gui.c
index a3cd57b..6859143 100644
--- a/amiga/gui.c
+++ b/amiga/gui.c
@@ -5483,6 +5483,30 @@ int main(int argc, char** argv)
}
}
+#ifdef __amigaos4__
+ if(LIB_IS_AT_LEAST((struct Library *)DOSBase, 51, 96)) {
+ struct InfoData *infodata = AllocDosObject(DOS_INFODATA, 0);
+ if(infodata == NULL) {
+ ami_misc_fatal_error("Failed to allocate memory");
+ return RETURN_FAIL;
+ }
+ GetDiskInfoTags(GDI_StringNameInput, users_dir,
+ GDI_InfoData, infodata,
+ TAG_DONE);
+ if(infodata->id_DiskState == ID_DISKSTATE_WRITE_PROTECTED) {
+ FreeDosObject(DOS_INFODATA, infodata);
+ ami_misc_fatal_error("Cannot run with user dir on a write-protected
volume");
+ return RETURN_FAIL;
+ }
+ FreeDosObject(DOS_INFODATA, infodata);
+ } else {
+#else
+//FIXME for OS3 and older OS4
+#endif
+#ifdef __amigaos4__
+ }
+#endif
+
int len = strlen(current_user);
len += strlen(users_dir);
len += 2; /* for poss path sep and NULL term */
commitdiff
http://git.netsurf-browser.org/netsurf.git/commit/?id=7733ece4724d164f31e...
commit 7733ece4724d164f31e3be337ed09022f97d1d0e
Author: Chris Young <chris(a)unsatisfactorysoftware.co.uk>
Commit: Chris Young <chris(a)unsatisfactorysoftware.co.uk>
Remove the setting of mimetype in default tooltypes
NetSurf is a lot more liberal now in accepting files, so the mimetype guessing
routines are sufficient without forcing CSS files to be recognised as text/css. The
ability to add a tooltype to troublesome files remains.
diff --git a/amiga/dist/Install b/amiga/dist/Install
index a0a2bf4..439cc73 100755
--- a/amiga/dist/Install
+++ b/amiga/dist/Install
@@ -1,18 +1,5 @@
; Installation script for NetSurf
-(procedure p_setmimetype #type #mimetype
- (transcript "Setting MIME Type " #mimetype " for default " #type
" icon")
-
- (set #fullpath (cat "ENVARC:Sys/def_" #type))
-
- (tooltype
- (prompt "Setting MIME type")
- (help @tooltype-help)
- (dest #fullpath)
- (settooltype "MIMETYPE" #mimetype)
- )
-)
-
(procedure p_append #filename #text
(set #file-path (tackon "ENVARC:launch-handler/URL" #protocol))
(set #def-file-path (tackon "ENVARC:launch-handler/URL/defaults" #protocol))
@@ -298,26 +285,6 @@
(complete 80)
-(working "Setting MIME types")
-(p_setmimetype "css" "text/css")
-(p_setmimetype "html" "text/html")
-(p_setmimetype "ascii" "text/plain")
-(p_setmimetype "jpeg" "image/jpeg")
-(p_setmimetype "gif" "image/gif")
-(p_setmimetype "png" "image/png")
-(p_setmimetype "jng" "image/jng")
-(p_setmimetype "mng" "image/mng")
-(p_setmimetype "svg" "image/svg")
-(p_setmimetype "bmp" "image/bmp")
-(p_setmimetype "ico" "image/ico")
-(p_setmimetype "sprite" "image/x-riscos-sprite")
-(p_setmimetype "webp" "image/webp")
-(p_setmimetype "lha" "application/x-lha")
-(p_setmimetype "zip" "application/x-zip")
-(p_setmimetype "js" "application/javascript")
-
-(complete 85)
-
(if (>= osver 53)
(if (= (exists "Rexx:NetSurf") 0)
(
@@ -364,7 +331,7 @@
)
)
-(complete 90)
+(complete 85)
(if (= #addlaunchhandler 1)
(
@@ -391,7 +358,7 @@
)
)
-(complete 95)
+(complete 90)
(working "Running FixFonts")
diff --git a/amiga/file.c b/amiga/file.c
index ae9e3d0..8e81b9c 100644
--- a/amiga/file.c
+++ b/amiga/file.c
@@ -117,17 +117,13 @@ static void ami_file_set_type(const char *path, lwc_string
*mime_type)
content_type type = content_factory_type_from_mime_type(mime_type);
const char *default_type;
- switch(type)
- {
- case CONTENT_HTML:
- default_type = "html";
- break;
- case CONTENT_CSS:
- default_type = "css";
- break;
- default:
- default_type = NULL;
- break;
+ switch(type) {
+ case CONTENT_HTML:
+ default_type = "html";
+ break;
+ default:
+ default_type = NULL;
+ break;
}
if (default_type != NULL) {
-----------------------------------------------------------------------
Summary of changes:
amiga/dist/Install | 37 ++-----------------------------------
amiga/file.c | 18 +++++++-----------
amiga/gui.c | 24 ++++++++++++++++++++++++
3 files changed, 33 insertions(+), 46 deletions(-)
diff --git a/amiga/dist/Install b/amiga/dist/Install
index a0a2bf4..439cc73 100755
--- a/amiga/dist/Install
+++ b/amiga/dist/Install
@@ -1,18 +1,5 @@
; Installation script for NetSurf
-(procedure p_setmimetype #type #mimetype
- (transcript "Setting MIME Type " #mimetype " for default " #type
" icon")
-
- (set #fullpath (cat "ENVARC:Sys/def_" #type))
-
- (tooltype
- (prompt "Setting MIME type")
- (help @tooltype-help)
- (dest #fullpath)
- (settooltype "MIMETYPE" #mimetype)
- )
-)
-
(procedure p_append #filename #text
(set #file-path (tackon "ENVARC:launch-handler/URL" #protocol))
(set #def-file-path (tackon "ENVARC:launch-handler/URL/defaults" #protocol))
@@ -298,26 +285,6 @@
(complete 80)
-(working "Setting MIME types")
-(p_setmimetype "css" "text/css")
-(p_setmimetype "html" "text/html")
-(p_setmimetype "ascii" "text/plain")
-(p_setmimetype "jpeg" "image/jpeg")
-(p_setmimetype "gif" "image/gif")
-(p_setmimetype "png" "image/png")
-(p_setmimetype "jng" "image/jng")
-(p_setmimetype "mng" "image/mng")
-(p_setmimetype "svg" "image/svg")
-(p_setmimetype "bmp" "image/bmp")
-(p_setmimetype "ico" "image/ico")
-(p_setmimetype "sprite" "image/x-riscos-sprite")
-(p_setmimetype "webp" "image/webp")
-(p_setmimetype "lha" "application/x-lha")
-(p_setmimetype "zip" "application/x-zip")
-(p_setmimetype "js" "application/javascript")
-
-(complete 85)
-
(if (>= osver 53)
(if (= (exists "Rexx:NetSurf") 0)
(
@@ -364,7 +331,7 @@
)
)
-(complete 90)
+(complete 85)
(if (= #addlaunchhandler 1)
(
@@ -391,7 +358,7 @@
)
)
-(complete 95)
+(complete 90)
(working "Running FixFonts")
diff --git a/amiga/file.c b/amiga/file.c
index ae9e3d0..8e81b9c 100644
--- a/amiga/file.c
+++ b/amiga/file.c
@@ -117,17 +117,13 @@ static void ami_file_set_type(const char *path, lwc_string
*mime_type)
content_type type = content_factory_type_from_mime_type(mime_type);
const char *default_type;
- switch(type)
- {
- case CONTENT_HTML:
- default_type = "html";
- break;
- case CONTENT_CSS:
- default_type = "css";
- break;
- default:
- default_type = NULL;
- break;
+ switch(type) {
+ case CONTENT_HTML:
+ default_type = "html";
+ break;
+ default:
+ default_type = NULL;
+ break;
}
if (default_type != NULL) {
diff --git a/amiga/gui.c b/amiga/gui.c
index a3cd57b..6859143 100644
--- a/amiga/gui.c
+++ b/amiga/gui.c
@@ -5483,6 +5483,30 @@ int main(int argc, char** argv)
}
}
+#ifdef __amigaos4__
+ if(LIB_IS_AT_LEAST((struct Library *)DOSBase, 51, 96)) {
+ struct InfoData *infodata = AllocDosObject(DOS_INFODATA, 0);
+ if(infodata == NULL) {
+ ami_misc_fatal_error("Failed to allocate memory");
+ return RETURN_FAIL;
+ }
+ GetDiskInfoTags(GDI_StringNameInput, users_dir,
+ GDI_InfoData, infodata,
+ TAG_DONE);
+ if(infodata->id_DiskState == ID_DISKSTATE_WRITE_PROTECTED) {
+ FreeDosObject(DOS_INFODATA, infodata);
+ ami_misc_fatal_error("Cannot run with user dir on a write-protected
volume");
+ return RETURN_FAIL;
+ }
+ FreeDosObject(DOS_INFODATA, infodata);
+ } else {
+#else
+//FIXME for OS3 and older OS4
+#endif
+#ifdef __amigaos4__
+ }
+#endif
+
int len = strlen(current_user);
len += strlen(users_dir);
len += 2; /* for poss path sep and NULL term */
--
NetSurf Browser