equal
deleted
inserted
replaced
23 |
23 |
24 TInt DoMakeFileWriteableL(const TDesC& aFile) |
24 TInt DoMakeFileWriteableL(const TDesC& aFile) |
25 { |
25 { |
26 // Make sure the file is not read-only |
26 // Make sure the file is not read-only |
27 RDebug::Print(_L("Open for writing file %S\n"), &aFile); |
27 RDebug::Print(_L("Open for writing file %S\n"), &aFile); |
28 |
28 TInt r = KErrNone; |
29 RFs fs; |
29 RFs fs; |
30 fs.Connect(); |
30 r = fs.Connect(); |
|
31 if (r != KErrNone) |
|
32 { |
|
33 User::Leave(r); |
|
34 } |
31 CFileMan* fileMan = CFileMan::NewL(fs); |
35 CFileMan* fileMan = CFileMan::NewL(fs); |
32 CleanupStack::PushL(fileMan); |
36 CleanupStack::PushL(fileMan); |
33 TInt err = fileMan->Attribs(aFile, 0, KEntryAttReadOnly, TTime(0), 0); |
37 TInt err = fileMan->Attribs(aFile, 0, KEntryAttReadOnly, TTime(0), 0); |
34 CleanupStack::PopAndDestroy(fileMan); |
38 CleanupStack::PopAndDestroy(fileMan); |
35 fs.Close(); |
39 fs.Close(); |