aboutsummaryrefslogtreecommitdiffstats
path: root/recipes/gtk-webcore/files/fix-loading-error-report.patch
blob: 09e6f4f03a941930c8314768cd5a4404e9c181a1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
--- NRCit.orig/src/gtk/webi.cc.orig     2006-04-04 01:53:14.000000000 +0300
+++ NRCit/src/gtk/webi.cc       2006-04-04 01:44:20.000000000 +0300
@@ -839,12 +839,15 @@
     status->status = WEBI_LOADING_COMPLETE;
     status->statusCode = statusCode;
 
+    g_signal_emit_by_name(webi, "status", status);
 //    assert(status->ready == status->files);
 }
 
 void MyRoot::internalStatusStartItem(const OSB::ResourceStatus * _status)
 {
     if (!internal) return;
+
+    status->status = WEBI_LOADING_START;
     status->files++;
     g_signal_emit_by_name(webi, "status", status);
 }
@@ -852,6 +855,8 @@
 void MyRoot::internalStatusHeadersItem(const OSB::ResourceStatus * _status)
 {
     if (!internal) return;
+
+    status->status = WEBI_LOADING_START;
     if (_status->size()) {
         status->size += _status->size();
         status->totalSize += _status->size(); 
@@ -863,6 +868,8 @@
 void MyRoot::internalStatusProgressItem(const OSB::ResourceStatus * _status)
 {
     if (!internal) return;
+    
+    status->status = WEBI_LOADING_START;
     status->totalReceived += _status->lastReceived();
     // in case Content-Length -header is not present
     if (!_status->size()) {
@@ -880,6 +887,7 @@
     status->ready++;
     if (_status->error()) {
         // FIXME: handle errors as well.u
+	status->status = WEBI_LOADING_ERROR;
     }
 
     g_signal_emit_by_name(webi, "status", status);
hard'>joshuagl/copyhard OpenEmbedded Core user contribution treesGrokmirror user
summaryrefslogtreecommitdiffstats
path: root/scripts/cp-noerror
blob: ab617c5d35a941d952a9615bd71e624ee0cd325d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
#!/usr/bin/env python3
#
# SPDX-License-Identifier: GPL-2.0-only
#
# Allow copying of $1 to $2 but if files in $1 disappear during the copy operation,
# don't error.
# Also don't error if $1 disappears.
#

import sys
import os
import shutil

def copytree(src, dst, symlinks=False, ignore=None):
    """Based on shutil.copytree"""
    names = os.listdir(src)
    try:
        os.makedirs(dst)
    except OSError: 
        # Already exists
        pass
    errors = []
    for name in names:
        srcname = os.path.join(src, name)
        dstname = os.path.join(dst, name)
        try:
            d = dstname
            if os.path.isdir(dstname):
                d = os.path.join(dstname, os.path.basename(srcname))
            if os.path.exists(d):
                continue
            try:
                os.link(srcname, dstname)
            except OSError:
                shutil.copy2(srcname, dstname)
        # catch the Error from the recursive copytree so that we can
        # continue with other files
        except shutil.Error as err:
            errors.extend(err.args[0])
        except EnvironmentError as why:
            errors.append((srcname, dstname, str(why)))
    try:
        shutil.copystat(src, dst)
    except OSError as why:
        errors.extend((src, dst, str(why)))
    if errors:
        raise shutil.Error(errors)

try:
    copytree(sys.argv[1], sys.argv[2])
except shutil.Error:
   pass
except OSError:
   pass