Skip to content

Commit

Permalink
fix: fixed sonarcloud issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Desu Sai Venkat committed Jan 31, 2024
1 parent fd88a6e commit ca89dac
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
4 changes: 2 additions & 2 deletions Sources/Classes/RSDefaultsPersistence.m
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@
#import "RSLogger.h"
#import "RSDefaultsPersistence.h"

@implementation RSDefaultsPersistence

static RSDefaultsPersistence *instance;
static NSString * const userDefaultsCopied = @"userDefaultsCopied";

@implementation RSDefaultsPersistence

+ (instancetype)sharedInstance {
if(instance == nil) {
static dispatch_once_t onceToken;
Expand Down
6 changes: 5 additions & 1 deletion Sources/Classes/RSUtils.m
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,11 @@ + (BOOL)isFileExists:(NSString *)fileName {
}

+ (BOOL)doesFileExistsAtURL:(NSURL *)fileURL {
return [[NSFileManager defaultManager] fileExistsAtPath:[fileURL path]];
NSString* filePath = [fileURL path];
if(filePath != nil) {
return [[NSFileManager defaultManager] fileExistsAtPath:filePath];
}
return NO;
}

+ (BOOL)removeFile:(NSString *)fileName {
Expand Down

0 comments on commit ca89dac

Please sign in to comment.