0 Replies Latest reply on May 16, 2009 6:10 PM by mschutze

    Bug when getting file path in non-english Windows Vista

    mschutze Level 1



      I'm getting an error when trying to get the file path of a video in a non-english Windows Vista... The code is:


      var file = "video.flv"

      var filePath = air.File.applicationStorageDirectory.resolvePath(file);
      filePath = filePath.nativePath;


      The filePath variable is used later by a flash video player to load the video file..


      In the brazilian Windows Vista the path of the StorageDirectory would be something like "C:\Usuários\(user name)\..." but if I run this script it returns "C:\Users\(user name)\..." as the native path.


      The problem seems to be in the "nativePath" function, cause I'm able to copy files to the app-storage folder using the "air.File.appicationStorageDirectory.resolvePath()" method without any problems.


      I could insert a small code which substitutes "Users" with "Usuários" but then it wouldn't work on an english Vista...


      Any ideas on this? Is there a way to check the language of the operating system in Air so to act accordingly?


      Thanks for any help!