@@ -41,14 +41,23 @@ struct st_waste
41
41
/** The parent directory, e.g. $HOME/.local/share/Trash */
42
42
char * parent ;
43
43
44
- /*! The info directory (where .trashinfo files are written) will be appended to the parent directory */
44
+ /** The info directory (where .trashinfo files are written) will be appended to the parent directory */
45
45
char * info ;
46
- int len_info ;
47
46
48
- /** Appended to the parent directory, where files are moved to when they are rmw'ed
49
- */
47
+ /** Appended to the parent directory, where files are moved to when they are rmw'ed */
50
48
char * files ;
51
- int len_files ;
49
+
50
+ /** If a waste folder is at the top level, a relative path will be
51
+ * used (per the Freedesktop trash spec). See
52
+ * https://github.com/theimpossibleastronaut/rmw/issues/299 for more
53
+ * info */
54
+ char * media_root ;
55
+
56
+ /** Points to the previous WASTE directory in the linked list */
57
+ st_waste * prev_node ;
58
+
59
+ /** Points to the next WASTE directory in the linked list */
60
+ st_waste * next_node ;
52
61
53
62
/** The device number of the filesystem on which the file resides. rmw does
54
63
* not copy files from one filesystem to another, but rather only moves them.
@@ -57,53 +66,44 @@ struct st_waste
57
66
*/
58
67
dev_t dev_num ;
59
68
60
- /** set to <tt>true</tt> if the parent directory is on a removable device,
69
+ int len_info ;
70
+ int len_files ;
71
+
72
+ /** Set to <tt>true</tt> if the parent directory is on a removable device,
61
73
* <tt>false</tt> otherwise.
62
74
*/
63
75
bool removable ;
64
76
65
- /*
66
- * If a waste folder is at the top level, a relative path will be
67
- * used (per the Freedesktop trash spec). See
68
- https://github.com/theimpossibleastronaut/rmw/issues/299 for more
69
- info */
70
- char * media_root ;
71
-
72
77
bool is_btrfs ;
73
-
74
- /** Points to the previous WASTE directory in the linked list
75
- */
76
- st_waste * prev_node ;
77
-
78
- /** Points to the next WASTE directory in the linked list
79
- */
80
- st_waste * next_node ;
81
78
};
82
79
80
+
83
81
/** Holds information about a file that was specified for rmw'ing
84
82
*/
85
83
typedef struct
86
84
{
87
85
/** The absolute path to the file, stored later in a .trashinfo file */
88
86
char * real_path ;
89
87
90
- /** The basename of the target file, and used for the basename of it's corresponding
88
+ /** The basename of the target file, and used for the basename of its corresponding
91
89
* .trashinfo file */
92
90
const char * base_name ;
93
91
92
+ /** The device number of the filesystem on which the file resides */
93
+ dev_t dev_num ;
94
+
94
95
/** The destination file name. This may be different if a file of the same name already
95
- * exists in the WASTE folder */
96
+ * exists in the WASTE folder */
96
97
char waste_dest_name [PATH_MAX ];
97
98
98
- dev_t dev_num ;
99
-
100
99
/** Is <tt>true</tt> if the file exists in the destination WASTE/files folder,
101
100
* false otherwise. If it's a duplicate, a string based on the current time
102
101
* will be appended to \ref dest_name
103
102
*/
104
103
bool is_duplicate ;
105
104
} rmw_target ;
106
105
106
+
107
107
extern const char * lit_info ;
108
108
extern const char * path_key ;
109
109
extern const char * deletion_date_key ;
0 commit comments