diff options
Diffstat (limited to 'apps/plugins')
-rw-r--r-- | apps/plugins/properties.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/apps/plugins/properties.c b/apps/plugins/properties.c index 0f3ec5c458..3115da94a4 100644 --- a/apps/plugins/properties.c +++ b/apps/plugins/properties.c | |||
@@ -99,13 +99,12 @@ static bool file_properties(char* selected_file) | |||
99 | log = human_size_log((unsigned long)info.size); | 99 | log = human_size_log((unsigned long)info.size); |
100 | rb->snprintf(str_size, sizeof str_size, "%lu %cB", | 100 | rb->snprintf(str_size, sizeof str_size, "%lu %cB", |
101 | ((unsigned long)info.size) >> (log*10), human_size_prefix[log]); | 101 | ((unsigned long)info.size) >> (log*10), human_size_prefix[log]); |
102 | struct tm tm; | ||
103 | rb->gmtime_r(&info.mtime, &tm); | ||
102 | rb->snprintf(str_date, sizeof str_date, "%04d/%02d/%02d", | 104 | rb->snprintf(str_date, sizeof str_date, "%04d/%02d/%02d", |
103 | ((info.wrtdate >> 9 ) & 0x7F) + 1980, /* year */ | 105 | tm.tm_year + 1900, tm.tm_mon + 1, tm.tm_mday); |
104 | ((info.wrtdate >> 5 ) & 0x0F), /* month */ | 106 | rb->snprintf(str_time, sizeof str_time, "%02d:%02d:%02d", |
105 | ((info.wrtdate ) & 0x1F)); /* day */ | 107 | tm.tm_hour, tm.tm_min, tm.tm_sec); |
106 | rb->snprintf(str_time, sizeof str_time, "%02d:%02d", | ||
107 | ((info.wrttime >> 11) & 0x1F), /* hour */ | ||
108 | ((info.wrttime >> 5 ) & 0x3F)); /* minutes */ | ||
109 | 108 | ||
110 | num_properties = 5; | 109 | num_properties = 5; |
111 | 110 | ||
@@ -175,7 +174,10 @@ static bool _dir_properties(DPS* dps) | |||
175 | dirlen = rb->strlen(dps->dirname); | 174 | dirlen = rb->strlen(dps->dirname); |
176 | dir = rb->opendir(dps->dirname); | 175 | dir = rb->opendir(dps->dirname); |
177 | if (!dir) | 176 | if (!dir) |
177 | { | ||
178 | rb->splashf(HZ*2, "%s", dps->dirname); | ||
178 | return false; /* open error */ | 179 | return false; /* open error */ |
180 | } | ||
179 | 181 | ||
180 | /* walk through the directory content */ | 182 | /* walk through the directory content */ |
181 | while(result && (0 != (entry = rb->readdir(dir)))) | 183 | while(result && (0 != (entry = rb->readdir(dir)))) |