wplayer

Check-in [60bd8ecddb]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Deal with non-ASCII file/dir names
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | master | trunk
Files: files | file ages | folders
SHA3-256:60bd8ecddb553c7bd52fbd5ae4a4d6f5986945592a059784dc726a59671dcee6
User & Date: ajv-899-334-8894@vsta.org 2016-01-28 04:37:38
Context
2016-01-28
04:41
Some boilerplate for HTML framing check-in: ea65e0c430 user: ajv-899-334-8894@vsta.org tags: master, trunk
04:37
Deal with non-ASCII file/dir names check-in: 60bd8ecddb user: ajv-899-334-8894@vsta.org tags: master, trunk
04:35
Some images for our controls. From /usr/share/icons/gnome, so please use under the terms of the Gnome project (http://gnome.org) check-in: c24fd39b82 user: ajv-899-334-8894@vsta.org tags: master, trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to get.py.

24
25
26
27
28
29
30
31
32
33
34
35











36

37
38
39
40
41
42
43
	return self.send_files("html/top.html")

    # Provide a directory listing.  It's JSON with lists
    #  of files and directories (sorted!) in the named path.
    def _send_dir(self, path):
	res = {}
	for path,dirs,files in os.walk(path):
	    res["files"] = sorted(files)
	    res["dirs"] = sorted(dirs)
	    break
	else:
	    # If the walk got nothing, provide empty lists











	    res["files"] = res["dirs"] = ()


	# Back it goes, as a JSON-encoded buffer
	return self.send_json(res)

    # GET dispatcher
    # See if it's a configured path, and serve file or dir
    def send_path(self):







<
<



>
>
>
>
>
>
>
>
>
>
>
|
>







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
	return self.send_files("html/top.html")

    # Provide a directory listing.  It's JSON with lists
    #  of files and directories (sorted!) in the named path.
    def _send_dir(self, path):
	res = {}
	for path,dirs,files in os.walk(path):


	    break
	else:
	    # If the walk got nothing, provide empty lists
	    files = dirs = ()

	# Normalize to UTF-8
	files = [f.decode('utf-8', 'replace') for f in files]
	dirs = [d.decode('utf-8', 'replace') for d in dirs]

	# In order
	files.sort()
	dirs.sort()

	# Put into place
	res["files"] = files
	res["dirs"] = dirs

	# Back it goes, as a JSON-encoded buffer
	return self.send_json(res)

    # GET dispatcher
    # See if it's a configured path, and serve file or dir
    def send_path(self):