Tadashi Okoshi
slash****@users*****
2005年 6月 20日 (月) 16:50:52 JST
Index: affelio/apps/Mixi/lib/AffelioApp/SNSGateway.pm
diff -u affelio/apps/Mixi/lib/AffelioApp/SNSGateway.pm:1.1.1.1 affelio/apps/Mixi/lib/AffelioApp/SNSGateway.pm:1.2
--- affelio/apps/Mixi/lib/AffelioApp/SNSGateway.pm:1.1.1.1 Tue Jun 14 12:53:30 2005
+++ affelio/apps/Mixi/lib/AffelioApp/SNSGateway.pm Mon Jun 20 16:50:52 2005
@@ -8,6 +8,7 @@
@AffelioApp::SNSGateway::EXPORT = qw (read_config write_config);
sub write_config{
+ my $afap =shift;
my $u =shift;
my $p =shift;
@@ -16,17 +17,21 @@
$cfg->{user}->{username} = $u;
$cfg->{user}->{password} = $p;
- $cfg->write("./data/config.ini");
+ my $filename = $afap->get_userdata_dir() . "/config.ini";
+ $cfg->write($filename);
return();
}
sub read_config{
+ my $afap =shift;
my $username="";
my $password="";
+ my $filename = $afap->get_userdata_dir() . "/config.ini";
+
my $cfg = Config::Tiny->new();
- $cfg = Config::Tiny->read("./data/config.ini");
+ $cfg = Config::Tiny->read($filename);
if($cfg){
$username = $cfg->{user}->{username};