Commit Graph

31 Commits

Author SHA1 Message Date
Stein Magnus Jodal
d9300f72bd scanner: Support symlinks 2013-03-12 19:59:19 +01:00
Stein Magnus Jodal
0f603c3ede Use urllib.{quote,unquote} instead of {pathname2url,url2pathname} 2012-12-12 23:13:52 +01:00
Stein Magnus Jodal
905ceeb72a utils: find_files() returns bytestrings 2012-12-12 13:45:37 +01:00
Stein Magnus Jodal
b5d9dc10a7 utils: Handle paths with non-UTF-8 encodings
- path_to_uri() encodes unicode input as UTF-8 and leaves bytestring input
  unchanged before it is converted to file:// URIs.

- uri_to_path() will now always return bytestrings, since we don't know if
  there is any non-UTF-8 encoded chars in the file path, and converting it to
  unicode would make such paths no longer match the dir or file it was
  referring to.

- split_path() will now assume it gets a bytestring in.
2012-12-12 13:45:37 +01:00
Stein Magnus Jodal
ec639d17ae docs: Unbreak build 2012-11-23 12:47:57 +01:00
Stein Magnus Jodal
d153fa6b59 Remove rogue commas making tuples of my strings 2012-11-21 10:42:33 +01:00
Stein Magnus Jodal
6cb2d6293d Improve fix for #256
- Forgot to decode result from glib.get_user_config_dir()
- glib.USER_DIRECTORY_MUSIC isn't always defined
2012-11-21 10:30:06 +01:00
Stein Magnus Jodal
26e6b2e730 Fix crash when XDG variables contain non-ASCII characters (fixes #256) 2012-11-21 10:20:08 +01:00
Stein Magnus Jodal
6acaa490e9 Make all strings unicode by default (fixes #224) 2012-11-13 00:18:47 +01:00
Stein Magnus Jodal
b110e6a478 Move file path is in base dir checker to mopidy.utils.path 2012-11-01 23:10:18 +01:00
Stein Magnus Jodal
65b550eb44 Ignore invalid pylint warnings (#211) 2012-10-17 01:42:58 +02:00
Stein Magnus Jodal
b8d637e1f5 Move DATA_PATH, SETTINGS_PATH, and SETTINGS_FILE to mopidy.utils.path 2012-10-17 00:21:24 +02:00
Stein Magnus Jodal
666800ec57 Fix most flake8 warnings (#211) 2012-10-16 14:00:34 +02:00
Thomas Adamcik
a707daf458 Add tests for expand_path and fix ordering.
Expansions need to happen before abspath is called or else result is wrong.
2012-09-16 22:26:44 +02:00
Thomas Adamcik
dda5e5261a Move and rename expand_path to mopidy.utils.path
Also switches a bit move of mopidy.utils.settings over to module imports and
double spaces between functions.
2012-09-16 22:07:59 +02:00
Thomas Adamcik
7ceb530064 Updated find files to ignore hidden files and folders. 2012-09-16 18:14:11 +02:00
Stein Magnus Jodal
8c2a333938 get_or_create_folder should also create intermediate folders 2012-02-09 23:12:40 +01:00
Thomas Adamcik
1985b4af76 Switch all tests over to from tests import unittest, which will be unittest2 on < 2.7 and plain unittest otherwise 2011-07-31 22:21:34 +02:00
Stein Magnus Jodal
6a8998a5c3 Fix pylint warnings 2010-11-02 23:42:02 +01:00
Thomas Adamcik
71ee3a8ef7 Don't remove expanduser from get_or_create_file and get_or_create_folder 2010-11-01 00:37:55 +01:00
Thomas Adamcik
fe309d374e Get rid of all kinds of abspath and expandpath usage that is no longer needed 2010-11-01 00:37:55 +01:00
Thomas Adamcik
7767dd1ae4 Better unicode handling for scan code 2010-10-30 23:35:04 +02:00
Thomas Adamcik
dd259d0797 Ensure that find_files only returns unicode 2010-10-30 23:12:32 +02:00
Thomas Adamcik
92333208de Add mopidy.utils.path.mtime helper that is easily faked in tests 2010-10-30 20:53:23 +02:00
Thomas Adamcik
d2d8e4c090 Use expanduser for find_files 2010-10-30 00:45:08 +02:00
Thomas Adamcik
a48e881040 Add split path util 2010-10-29 22:55:42 +02:00
Thomas Adamcik
d785b9b14e Added uri_to_path with tests 2010-10-29 22:16:33 +02:00
Thomas Adamcik
efc60a943b Update find files behaviour and add test for it 2010-10-26 00:08:51 +02:00
Thomas Adamcik
b455b54577 Add helper for finding files in folder 2010-10-25 23:31:40 +02:00
Stein Magnus Jodal
f18e56bef9 Create empty settings.py if it does not exist 2010-08-22 21:39:06 +02:00
Stein Magnus Jodal
e4edd70c6d Split mopidy.utils into smaller pieces 2010-08-17 00:32:31 +02:00