PhxJim;623203 Wrote: > > Sorry about the lack of formatting, I am not sure how to force the post > to keep the indentation. > You can get the forum to produce a formatted version by surrounding it with: [ code ] ... [ /code ] (Remove the spaces before/after [])
I haven't looked at the code in detail but this sounds like a bug, so maybe you should register it together with your patch at: http://bugs.slimdevices.com Formatted version comes here: Code: -------------------- function _mkdirRecursive(dir) --normalize to "/" local dir = dir:gsub("\\", "/") local dirPrefix = dir:sub(1,2) local isUnc = false if dirPrefix == "//" then isUnc = true end local newPath = "" for i, element in pairs(string.split('/', dir)) do newPath = newPath .. element if isUnc and i > 4 or not isUnc and i ~= 1 then --first element is (for full path): blank for unix , "<drive-letter>:" for windows if lfs.attributes(newPath, "mode") == nil then log:debug("Making directory: " , newPath) local created, err = lfs.mkdir(newPath) if not created then error (string.format ("error creating dir '%s' (%s)", newPath, err)) end end end newPath = newPath .. "/" end end -------------------- -- erland Erland Isaksson ('My homepage' (http://erland.isaksson.info)) (Developer of 'many plugins/applets' (http://wiki.slimdevices.com/index.php/User:Erland). If my answer helped you and you like to encourage future presence on this forum and/or third party plugin/applet development, 'donations are always appreciated' (http://erland.isaksson.info/donate)) ------------------------------------------------------------------------ erland's Profile: http://forums.slimdevices.com/member.php?userid=3124 View this thread: http://forums.slimdevices.com/showthread.php?t=86828 _______________________________________________ jive mailing list [email protected] http://lists.slimdevices.com/mailman/listinfo/jive
