From: <ny...@us...> - 2007-02-11 17:45:15
|
Revision: 340 http://svn.sourceforge.net/pmplib/?rev=340&view=rev Author: nyaochi Date: 2007-02-11 09:45:15 -0800 (Sun, 11 Feb 2007) Log Message: ----------- Convert the argument for -P option into its absolute path. Modified Paths: -------------- trunk/pmplib/frontend/easypmp/cui/main.c Modified: trunk/pmplib/frontend/easypmp/cui/main.c =================================================================== --- trunk/pmplib/frontend/easypmp/cui/main.c 2007-02-11 17:33:05 UTC (rev 339) +++ trunk/pmplib/frontend/easypmp/cui/main.c 2007-02-11 17:45:15 UTC (rev 340) @@ -278,6 +278,22 @@ goto exit_main; } + // Convert the source directory for playlist conversion described in relative path. + if (opt.path_to_playlist_source) { + if (filepath_is_relative(opt.path_to_playlist_source)) { + char pwd[MAX_PATH+1]; + ucs2char_t pwd_ucs2[MAX_PATH+1]; + ucs2char_t tmp[MAX_PATH+1]; + + getcwd(pwd, MAX_PATH); + mbstoucs2(pwd_ucs2, MAX_PATH, pwd, strlen(pwd)+1); + + filepath_relative_to_absolute(tmp, pwd_ucs2, opt.path_to_playlist_source); + ucs2free(opt.path_to_playlist_source); + opt.path_to_playlist_source = ucs2dup(tmp); + } + } + // Generate the path_to_root (path to the root directory of a device). if (!opt.path_to_root[0]) { // If path_to_root is not set, use the current directory. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |