mirror of
https://github.com/edeproject/ede.git
synced 2023-08-10 21:13:03 +03:00
Small refactoring
This commit is contained in:
@@ -311,3 +311,16 @@ char* get_basename(const char* path) {
|
||||
|
||||
return (char*)path;
|
||||
}
|
||||
|
||||
bool is_temp_filename(const char* path) {
|
||||
int len;
|
||||
|
||||
if(!path || path[0] == '\0' || path[0] == '.')
|
||||
return true;
|
||||
|
||||
len = strlen(path);
|
||||
if(path[len - 1] == '~')
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
Reference in New Issue
Block a user