fixes bug 166792 "move nsIIOService::GetURLSpecFromFile, etc. to

nsIFileProtocolHandler" r=dougt sr=alecf
This commit is contained in:
darin%netscape.com 2006-05-17 02:35:18 +00:00
Родитель 56d915d263
Коммит 8280b6c4c3
2 изменённых файлов: 5 добавлений и 3 удалений

Просмотреть файл

@ -183,7 +183,8 @@
fileLocator = fileLocator.QueryInterface(Components.interfaces.nsIProperties);
var file = fileLocator.get(mimeTypes, Components.interfaces.nsIFile);
var ioService = Components.classes["@mozilla.org/network/io-service;1"].getService(Components.interfaces.nsIIOService);
gDS = gRDF.GetDataSource(ioService.getURLSpecFromFile(file));
var fileHandler = ioService.getProtocolHandler("file").QueryInterface(Components.interfaces.nsIFileProtocolHandler);
gDS = gRDF.GetDataSource(fileHandler.getURLSpecFromFile(file));
}
function onAccept()

Просмотреть файл

@ -89,8 +89,9 @@ function Startup()
var file = fileLocator.get(mimeTypes, Components.interfaces.nsIFile);
var ioService = Components.classes["@mozilla.org/network/io-service;1"].getService(Components.interfaces.nsIIOService);
dump("spec is " + ioService.getURLSpecFromFile(file));
gDS = gRDF.GetDataSource(ioService.getURLSpecFromFile(file));
var fileHandler = ioService.getProtocolHandler("file").QueryInterface(Components.interfaces.nsIFileProtocolHandler);
dump("spec is " + fileHandler.getURLSpecFromFile(file));
gDS = gRDF.GetDataSource(fileHandler.getURLSpecFromFile(file));
// intialize the listbox
gList.database.AddDataSource(gDS);